Conditionally required fields (Required condition)

Written by Rob Updated over a week ago

The 'Required' and 'Read Only' option on the form designer allows you to define fields that are always required or always read only. There may be times you will need to make a field required or read only based on the answer(s) to a previous field.

This is when you will use the 'Required Condition' and 'ReadOnly Condition'properties. For this article we'll use required condition as our example. Everything below applies equally to the read only condition.

Required condition allows you to define a formula that will control whether or not the field is required. Let's assume your form design has a 'Do you have any hazards?' field with data name of 'seeHazards'. The seeHazards field has the values 'Yes' and 'No' as available option answers. Follow these steps:

Add a new text field to your form design under the seeHazards field.

Give the new field a data name such as 'hazardsDescription'.

Find the required property on the new field, click 'Add Condition' on the right. This will hide the standard 'Required' checkbox and show the required condition formula field.

Create a formula that will give a true or false result. When the formula result is true, the field will become required. When the result is false, the field will not be required.

Enter the following formula into the required condition property:

##{{seeHazards}} = 'Yes'

This means that when the seeHazards field is answered with a value of yes, the hazardsDescription field will be required. The user will not be able to proceed until they have filled out something in the hazardsDescription.

Save your form and then test it on your device to see the conditionally required functionality in action. If you'd like to try the above example out for yourself download the attached file. After downloading, create a new form. In the form designer, click the 'Import Fields' button to import the file. This will import the above example for you to check out.