Conditional Forms
5 minutes to read- Hide/show fields or a section of fields
- Make fields required
- Disable a field
- Make fields Display Only (non-editable)
Adding a New Rule
In this article, you create new criteria on a submission form. Ensure that a submission form has been created already.- Navigate to the DataPages listing and click Edit to configure the Submission form. Go directly to the Configure Fields screen in the DataPage Wizard and click the Rules tab.
- To add a new rule, click the Add button under the Rules List. Each rule may have one or more Criteria and one or more Actions that occur when the rule is triggered.
- Under the Criteria section, click New to define new criteria.
- Specify conditions that trigger the rule and operator. You can create conditions on the following:
- Field Name – Use a field from the dropdown selection to set the criteria.
- Parameter – Enter a parameter to set the criteria.
- Value – Enter a value to set the criteria.
- File Fields, Calculated Fields, CAPTCHA, and Distance Search fields
- Smart fields, such as Timestamp and Password
- Secondary field used in multiple search criteria (such as in Date Range)
- Localized Number and Date fields, such as dd/mm/yyyy formatted date.
- HTML Blocks
- Click OK.
- Once your Criteria is set up, you can define the Action that will occur when the rule is triggered. Under the Actions section, click New.
- You can choose to hide, disable, or require in the Action field and specify the field or section in the Field or section field to make the condition.
- To create multiple criteria for each rule, click the New button to add another criteria, and then confirm the match type:
- Select match all criteria (AND) if all criteria must be met to trigger the rule.
- Select match any criteria (OR) where any of the criteria can be true to run the rule.
You can specify the following actions.
Action | Description | Applied to | Availability |
Hide | Hides the field or section | Fields Sections | Search form Submission form Details page Single record update |
Disable | Disables field or section, where the form element is still visible but is no longer editable | Fields Sections | Search form Submission form Details page Single record update |
Require | Makes the field required | Fields | Submission form Details page Single record update |
Static | Makes the field static (display-only) | Fields | Details page Single record update |
Action Limitations
Note that only standard editable fields may be used in Actions, and the following cannot be used:- Required fields
- Display Only fields
- Calculated Value fields
- Section with Required fields
- The same field or section already used in another Action
- Calculated Fields, CAPTCHA, and Distance Search fields
- HTML Blocks
- Hidden or smart fields (Timestamp, AutoValue, ViewIncrement)
- Static action on Password fields
- Secondary field used in multiple search criteria (such as in Date Range)
Frequently Asked Questions
Why I don’t see a field in the Criteria list?
Only standard editable fields may be used in the Criteria. See the Criteria Limitations section listed above for elements that cannot be used in Criteria.
Why don’t I see a field or section in the Action list?
A common reason why a field is not appearing in the Action list is because it is set to display-only or required. Also, each field or section can be used only in one action (and therefore will no longer appear in the dropdown list). See the Action Limitations section listed above for elements that cannot be used in actions.
How do I create a rule for multiple fields?
To create a rule for multiple fields, insert a Section containing the appropriate fields and apply the Action to that section.
How can I define several actions for the same field?
First create a Section that includes the field. Apply one Action to the field and another Action to the Section.
How can I hide fields displayed across multiple columns?
When displaying fields on the same line or across multiple columns, hiding them will create a blank space in those cells. In this case, it may be preferred to disable those fields rather than hide them.
Why did my rule disappear?
A rule is deleted if you remove the conditional field from your form.
How do I show fields?
If you want to conditionally show fields in your form, you first have to display all the available fields, and then define a rule to initially hide them. For example, hide the field when it is Not Equal to the value.
Here is a list of common operators you might use to show/hide fields:
Operator to show fields | Operator to hide fields |
Equal | Not Equal |
Checked | Not Checked |
Less than | Greater Than |
Greater than | Less than |
Contains | Does Not Contain |