Conditional fields are a set of custom fields that are displayed to users when certain conditions are met. The conditions in question are generally the values that were set by/taken from other custom fields.
Configuring Conditional Fields
In this guide, we'll provide a scenario for the conditional fields and how to set them up in your workflow.
In the user profile workflow, we would like to ask users of what sports activities they are interested in. But first, we would like to know if they are interested in them. So, based on this, we'll need to configure the sports activities option to be shown depending on whether they are interested.
Custom Fields
Navigate to EasySocial > Users > Profile Form Builder and select a user workflow you like to work on.
Click on the + New Custom Field button to add a new custom field. You should select a Boolean custom field and set the title to something like "Do you play sports as a hobby?".
After selecting the boolean custom field, then, set the details accordingly.
Next, click on the + New Custom Field button to add a new custom field. Select the Dropdown List custom field and set the details accordingly. Add some sports activity choices for the dropdown under the Field tab.
Click the Save button to store the changes.
Applying Conditional Rules
Now that we have the 2 custom fields set up, we can start to configure the conditional rules. Our goal is to show the second custom field (dropdown) depending on the user's selection of the first custom field (boolean). As such, we've to set the conditional rules in the second custom field (dropdown).
Open the dropdown field setting and mark the checkbox that says This is a conditional custom field. Then, you'll notice that an additional tab called Conditional Rules instantly appeared.
Click on the Conditional Rules tab and then click on the leftmost dropdown. A list of all supported custom fields in the current workflow will appear. Select the earlier boolean custom field that we've created.
Next, please choose the logic criteria when 2 or more criterias are added.
Example:
ChoosingANDlogic indicate that all your criterias must be true for the condition to be satisfied. Whereas choosingORmeans that at least 1 criterion is true, then the condition is satisfied.
The second dropdown should be the conditional action of the custom field. We'll use
Equalin this example. In the value textbox, enter1and click done. That is all.You'll have the option to add more criterias if you want the field to be appeared based on values selected from several fields. In the above screenshot, we've added another boolean field and selected
ORlogic criteria so that the dropdown will be displayed when any of these boolean fields is set toYes.NOTE:
Value1representsYesand value0representsNofor the boolean custom field.
Click the Save button to store the changes in the workflow.
Testing Conditional Fields
You can test this by registering a new user or editing an existing user that uses this workflow. You should see the dropdown field will be displayed after either one of the boolean fields is set to Yes.
Selecting No
Selecting Yes
Limitation
You may notice that only certain custom fields are displayed in the dropdown when configuring a rule in the conditional rules tab. This is because currently only these custom fields are supported:
- Gender
- Boolean
- Checkbox
- Country
- Textarea
- Textbox
- Dropdown
- Multilist
- Mutlidropdown
- Multitextbox






