Conditional Fields
This page demonstrates how a form can conditionally display or hide fields based on the return value of a callback.
This feature is particularly useful for a form in which some fields should be filled only when other fields are set to a particular value.
The conditional fields feature is implemented by a callback associated with the zpFormDisplayWhen or zpFormVisible property. When the callback function returns true, the dependent field is displayed. When the callback returns false, the field is hidden.
If you use the zpFormDisplayWhen property, hidden fields do not use any space in the form. If you use zpFormVisibleWhen, fields always use the space, even when they are hidden.
Define the callback functions before creating the Zapatec.Form object.




Personal information










Online Information