Dependencies
When you setup a dependency, you a create a dependent relationship between one form element and another. When you configure a dependency for an element, that element (field) may change depending on the result of a match condition within a rule. The element will either be required, made visible, or both.
Important
Since dependencies are rule-based, it is very important to understand rules before creating a dependency.Most of the form elements have a Dependency property, and creating a dependency is the same in all cases. Simply follow these steps:
- Find the Dependency property in the Field General Setting group of the Element Properties Panel.
- Click the Edit Rule button to configure the rule using one or more filters. The rule is an integral part of the dependency, so you must add at least one valid filter in the rule in order to save the dependency. Again, see the Rules topic to understand how to properly configure a rule.
- In the On Match Action drop-down, choose the action that will trigger if the form conditions are such that a match is made with one of the rule filters. Decide among these options:
- Make the field required
- Make the field visible yet not required
- make the field both visible and required
- Toggle the field enabled/disabled
- In the Animate drop-down, select true if you want to animate the appearance of the field (this behavior only applies to the Field Visible actions). If you choose to animate, then you may optionally change the Speed and Animation Type.
- The Clear On Hide checkbox can be checked, if you wish to clear the values in any of the fields hidden by the dependency. This applies to all child fields of a group hidden by a dependency or an individual field.
- Click Save to complete and commit the setup of the dependency.
To delete the dependency, click the Remove Dependency button.
Pro Tip
You can define a dependency on a group or panel to hide an entire group of fields with one rule.To delete the dependency, click the Remove Dependency button.
Editing Dependency Rules
Though there is only one dependency for each form element, you can create more than one filter in the rule. Also, for dependencies, the Advanced Mode is available in the Rule Editor.
Typical Uses for Dependencies
There are many ways to use dependencies, including some of the examples we provide here.
Conditionally required fields
You can create a dependency If you need to make a field required based on a condition. For example, you might make a text field required if the user checks a checkbox, but leave it as optional if the checkbox is left empty.
Make hidden fields visible when user makes selections in another element
Another way to use the dependency feature is to setup the dependency property for several address elements. You could set the rule for each of those elements to be the same. The rule could check, for example, the selection that the user made in a Country special field. Depending on the country chosen, you could make some of those address fields visible (using one of the Make Field Visible choices in the On Match Action setting).
0 Comments