Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Optional sections can cause the validity of a form to change dynamically. For example, consider the following form:

(need screen shot)Image Added

The only required field in the form is Name and since it contains a valid value, the Submit button is enabled and the form may be submitted. The entire Address section is optional. However, if the user chooses to enter an address, then the entire address is required. If the user enters a value in the Street field, the City, State and Zip fields will become invalid and the Submit button will be disabled until valid values are entered in the three newly required fields.

(need screen shot)Image Added

If the user changes his/her mind and removes the value from the Street field,  will recalculate the validity of the form and infer that the Address section is no longer invalid since it is optional. The generated XML instance document will also not contain an address element. Once again,  is automatically ensuring that it is not possible to submit a form that is in an invalid state and that would generate an invalid document.

...