Writing XML to have Interdependent Require Fields

From Zymonic

Writing Interdependent Required Fields[edit]

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:

       <Condition no_cache="true">
         <DisplayName>XXX should be entered</DisplayName>

Validation to ensure at least one of the fields is populated:

     <Validation class="Value">
       <DisplayName>XXX or YYY must be entered</DisplayName>

Conditional Format to hide the 'opposite' field when one field is populated


Note that there is a generic class to hide things in the main CSS (hidden) - however, using it rather than just disabling the inputs causes the other fields to move around and is not ideal.

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