Often times, you may want to control whether parts of a form appear or disappear based on answers to other questions on that form. A common use case is requiring comments if a person chooses an 'other' option.
In Risk Cloud, these conditional rules are defined on a Section, Sub-Section or Field within a Step. A Section in is a container that holds other Sub-Sections and Fields. Section, Sub-Section or Field conditions can optionally be disabled by default and only enabled conditionally based upon the responses to specific Field(s). The process of enabling conditions on a form is described below.
Navigating to the Conditional Section, Sub-Section or Field Options
For Section or Sub-Section, click on the Gear icon next to the Section or Sub-Section you would like to add condition to, then click on the Add Conditions icon.
For Field conditions, expand the Field setting panel by clicking on the drop down arrow next to the Field name, then, click on condition icon.
Adding a Condition
Select the Field, Operator, and Value that you would like this section to be conditional upon, then click the +Add button to create the condition. (In the displayed example, the section we are making conditional will only be displayed if the selected field Equals ‘Yes’.)
Note: If you don't see a Field show up in the drop down menu, search for the Field typing the name into the search box.
You will now see the condition has been added to the list below.
Important: By default, the conditions are enabled.
If you would not like the condition enabled, click the Enable button to deactivate it (it will turn gray to signify it is deactivated).
Optionally, select how you would like the default state of this section to be displayed.
If Hidden, then the Section will not appear AT ALL until at least one of the below criteria is met.
If Inactive, then the Section will appear to the user, but they will not be able to enter any data within that Section until one of the below criteria is met.
Toggle the default state to Hidden and click Save. You'll be taken back to the step screen, the ‘Manage section conditions.’ icon will then turn blue to indicate that conditions are active upon that section.
Test that the Conditions are Working
The Conditional Section by default is hidden entirely once conditions are active:
Once the defined conditions are met, within the same screen, the conditional section will become active and you are able to edit the fields contained therein:
Conditional Sections can be applied to Sections, Sub-Sections and Fields.
If there is more than one criteria, they will each be evaluated sequentially until one is satisfied, and then the section with be enabled (if Inactive) or shown (if Hidden).
If there are Required Fields within the Section, the requirements will only be enforced once the conditions are met. In other words, if you make a Field required that is in a Section that is not shown or enabled, the end-user can still submit that piece of Work even if the Field is not completed. However, once that condition is satisfied on the Section/Sub-Section, the user will then be required to complete the Required Field.