Writing XML to have Interdependent Require Fields

=Writing Interdependent Required Fields=

Where either one field or another (but only one field) must be filled in.

A condition for each of the fields to determine if it is empty:

 XXX_not_present_condition XXX should be entered  XXXXX  Equals     Validation to ensure at least one of the fields is populated:

<Validation class="Value"> XXX_validation</ZName> XXX or YYY must be entered</DisplayName> <ClassOptions> <Required>true</Required> </ClassOptions> <PassOnConditionFail>true</PassOnConditionFail>  XXX_not_present_condition</ZName> </Condition> </Validation> Conditional Format to hide the 'opposite' field when one field is populated

<ConditionalFormat> XXX_hide_cf</ZName> zz_disabled <DisableInputs>true</DisableInputs>  XXX_present_condition</ZName> <Base>XXX_not_present_condition</Base> NotEqual</Test> </Condition> </ConditionalFormat>

Note that there is a generic class to hide things in the main CSS:

/* Generic class to hide things */ .hidden { display: none; }

Add a ShortDescription to each field explaining that the other field can be shown by clearing 'this' one.