Form Level Rules provide a very flexible and robust rule/skip logic, calculations, and workflow. For an overview of Form Level Rules please click here.
Note:Form Level Rules are an advanced feature and oftentimes it is simpler to use Field Level rules if your rule doesn't require complex business logic or conditions on multiple fields at the same time.
In the following example, let's assume we are working on an inspection form that we want to show a Text Field to capture Notes if an issue was found with the inspection.
To setup a Form Level rule to accomplish this, open your form in the Form Builder. Click the "Rules" button to open up the rule editor:
You will be presented the Rule Builder screen. To add a Rule, click the "Add Rule" button:
Name your Rule - It's best to give this a logical name so you can easily find your rule in the list of rules you may have later on.
Add A Rule Condition
To add a Rule Condition, select a field in Field drop down list.
Next, select what type of evaluation you are performing. The list of operators will change based on the field that you selected. In the following example, we chose a Yes/No/NA field so we have the options Equals, Not Equals and Has Value.
Then select the value you are comparing your field to. In the example below, we are checking if the "Was there an issue found?" field has a value of "Yes":
Once you have setup your Rule conditions, you will next define the Actions that run if those conditions are met. You can add additional conditions to your rule by clicking the "+" button.
In the following example, we are going to Show the "Please describe the issue" text field if the user taps "Yes" on the "Was there an issue found?" field:
You can define as many actions as you'd like by clicking the green "+" button in the action list.
The following is a list of available actions that can be triggered on a Rule:
- Show (Else Hide) - Shows a field/section when a condition is met, otherwise hides it
- Show - Shows a field or section
- Hide (Else Show) - Hides a field/section when a condition is met, otherwise shows it
- Hide - Hides a field or section
- Set Color - Green - Sets a field or section's color to Green
- Set Color - Blue - Sets a field or section's color to Blue
- Set Color - Yellow - Sets a field or section's color to Yellow
- Set Color - Red - Sets a field or section's color to Red
- Clear Color - Resets a field or section color
- Disable (Else Enable) - Disables a field or section when a condition is met, otherwise Enables it
- Disable - Disables a field or section
- Enable (Else Disable) - Enables a field or section when a condition is met, otherwise Disables it
- Enable - Enables a field or section when a condition is met
- Required (Else Not Required) - Sets a field or section as required when a condition is met, otherwise sets it to Not Required
- Required - Sets a field or section to Required
- Not Required (Else Required) - Sets a field or section to Not Required when a condition is met, otherwise sets it to Required
- Not Required - Sets a field or section to Not Required
- Add Alert - Adds an Action Alert to the form when the conditions are met