With conditional logic in a process form, admins can ensure that field workers creating a case will only fill the fields that are relevant to their submission by showing specific fields based on the value of other fields. For example
-
An admin creates a form that will record office inventories
-
The person using the form chooses "Mobile Phone" as the category of the asset
-
Several fields related to "Mobile Phones" are displayed in the form while the unrelated fields are not displayed.
---
Create a process form and conditionally display fields
There’ll be 2 elements in implementing conditional logics in process forms
-
Source Field - the value of this field will be the basis of other fields if they will be displayed or not
-
Target Field - these are the fields that will be displayed conditionally based on the value of the source field
---
Steps to add rules to conditionally display fields
-
On the process’s fields tab, select the field that will determine which other fields are displayed based on its value (this is your source field)
-
Click “edit” field
-
In the field settings modal, select the logic tab then select add logic
-
In your rule’s condition (starts with When) define the value of the source field that determines when the target field should be shown
-
To set up your rule’s action (beginning with Then), select the fields you want to display when the condition is met. These are considered targets for your rule.
-
Click Add at the bottom-right of the “add rule” dialog
Identifying "logics" in process forms
Target fields in a process are indicated by logic icons next to the field name.
Hovering over the icon will show the conditions that apply to that field
Behavior of conditional logic
-
It’s possible to add multiple conditional rules in a source field
-
Target fields will not be displayed by default, and they are displayed when at least one of the source conditions are met.
-
Target fields will only submit data if they are displayed when the case form is submitted.
-
Required target fields are only required if they are displayed when the case form is submitted.
-
If you remove a field from the case form, associated logic may also be removed.
-
When more than one logic rule affects a target field, it will be shown when any of the rules are satisfied.