When creating a Capture form, you can include fields that are only displayed if certain conditions exist. For example, say you have a section in a bankruptcy-related form that asks about the client's assets that are valued at more than $2,000. If the client doesn't have any assets that meet this stipulation, you'd want to hide these questions from them.
You can make an entire section of fields conditional, or you can make individual fields within a section conditional:
- Section-level conditions are managed using "free fields", or ad hoc fields that aren't typically part of the matter type but are still needed to satisfy the condition. (See Creating Free Fields to Be Used in a Conditional Statement for a Section below for help creating these.)
- Field-level conditions are managed using custom data fields within the same section. These are "pulled" from the relevant custom data for the participant type or matter type.
Creating Free Fields to Be Used in a Conditional Statement for a Section
Conditions require other questions be answered before the condition can be satisfied. To make a section conditional, you can create what's called a "free" field. A free field is typically not associated with the matter type and simply used to determine which sections should or should not appear on the form.
To create a free field for a conditional section:
- In the Capture form you're either creating or editing, click Add Free Field, located near the bottom of the page. A Free Field section is added to the page.
- Enter a Field Name.
- Enter a Label. This is what will be displayed on the form
- Click the Type field and choose from the following:
-
Radio Button, which displays the options as a single-select list.
-
Dropdown, which displays the options in drop-down list.
-
Radio Button, which displays the options as a single-select list.
- In the Options field, enter the options you want users to choose from. Separate two or more options using a comma. Your completed free field may look something like this:
- If needed, move the free field to the place on the form where it will appear before the section it's associated with. To do this, you can click on the tab name and drag it to a different location.
- Save your changes by either clicking Create Form (if you're creating a new form) or Update Form (if you are editing an existing form).
Applying a Condition to a Section
You can use one or more free fields to determine whether a section in a Capture form should be shown or hidden.
To do this:
- Make sure you've created the free fields you need to use in testing the condition. See Creating Free Fields to Be Used in a Conditional Statement for a Section (above) for instructions.
- In the Capture form you're either creating or editing, in the top-right corner of the section you want to make conditional, click Set Section Conditionals. The Section Conditional Settings pane appears on the right side of the window.
- Toggle Enable Section Conditions on.
- Click the Show this section if drop-down list and choose from the following options:
- If you have multiple free fields you're using to check for this condition and only one of them needs to be fulfilled, choose any.
- If you have multiple free fields and all the fields need to be satisfied, choose all.
- Click Add condition. This adds the fields you can use in setting up your condition.
- Click Select field and choose the field you want to use. Options are grouped into categories based on what's available in your form (i.e., Free fields, Contact, and Collection).
- If needed, click the middle drop-down list and choose the operator (e.g., equals, does not equal, etc.)
- Click the Select value drop-down list and choose the value that must be matched to complete the condition.
- Optionally, click Add condition to add further conditions that must be met to hide or show the section.
- When you're finished, close the panel by clicking its X.
- Save your changes by either clicking Create Form (if you're creating a new form) or Update Form (if you are editing an existing form).
Applying a Condition to an Individual Field
You can also make individual fields within a section conditional. These conditions use other fields that are available within the data collection.
To do this:
- In the Capture form you're either creating or editing, find the section/collection that contains the field you want to be conditional.
- In the table that shows the fields used in the section, click Set Conditionals next to the field you want to make conditional. The Conditional Settings For: [Field Name] pane appears on the right side of the page.
- Toggle Enable Conditions on.
- Click the Show this field if drop-down list and choose from the following options:
- If you have multiple fields you're using to check for this condition and only one of them needs to be fulfilled, choose any.
- If you have multiple fields and all the fields need to be satisfied, choose all.
- Click Add condition. This adds the fields you can use in setting up your condition.
- Click Select field and choose the field you want to use. Options are grouped into categories based on what's available in your form (i.e., Free fields, Contact, and Collection).
- If needed, click the middle drop-down list and choose the operator (e.g., equals, does not equal, empty, is not empty.)
- Based on the operator you selected, click the last drop-down list and enter the value that must be matched to complete the condition. (This option may be disabled if the operator doesn't require it.)
- Optionally, click Add condition to add further conditions that must be met to hide or show the section.
- When you're finished, close the pane by clicking its X.
- Save your changes to the form by either clicking Save Form (if you're creating a new form) or Update Form (if you are editing an existing form).
Testing Your Conditions
Once you set up conditions within your form, you should always test the form to make sure it creates the interview experience you expect. You can do this by going to the Form Builder page (choose More > Capture > Form Builder) and clicking the ellipses icon for your form. Then choose Preview.
See Previewing a Capture Form for more information on previewing forms before you publish them.
Updated