[opencms-dev] make required one of two fields
Antonio Cordeddu
antoniocordeddu at coranto.it
Mon Sep 3 11:59:17 CEST 2012
Hi Federico,
in this case I used this workaround: create a nested content with the
fields (Internal, External) and then create a structured content that
calls your nested content using a required field, like in this example:
<xsd:complexType name=".....">
<xsd:sequence>
<xsd:element name="YourName" type="OpenCmsNestedContent" minOccurs="1"
maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
I hope this help you.
Kind regards
Antonio
On 03/09/2012 11.26, federico cacciapuoti wrote:
> Hi to all,
>
> I'm using opencms 7
> I have this situations:
>
> ........
> <xsd:complexType name=".....">
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="0" name="Internal"
> type="OpenCmsVfsFile"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="External" type="...."/>
> </xsd:sequence>
> </xsd:complexType>
> ......
>
> I need that al least one of these two fields have to be required but
> not both.
>
> So in the workplace I can't save the changes to an "object" if I don't
> fill at least one of the two fields.
>
> There is in opencms an option to make this?
> I was thinking to do that, using a regular expression, but i don't
> know if I can recover the fields and use them in <validationrules> tag.
>
> Thanks.
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
_______________________________________
Coranto informatica di Antonio Cordeddu
Via Torricelli, 9 09047 Selargius (CA)
antoniocordeddu at coranto.it
Skype: antonio.cordeddu
http://www.coranto.it
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120903/b8deea34/attachment.htm>
More information about the opencms-dev
mailing list