'Required' and 'Read Only' options on the form designer allow 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 'Read Only 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:

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

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

3. 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.

4. 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.  To understand more about how to create a formula, see the Creating a Formula help page.

Did this answer your question?