Create and Manage Conditional Logic

Harness the power of Conditional Logic in form creation to streamline your workflows. This guide offers detailed steps on how to create, manage, and test rules that adapt based on user responses, making your forms dynamic and responsive. This topic describes how to effectively use Conditional Logic to enhance the field user experience and boost efficiency.

Available on the Advanced and Enterprise tiers:

Essentials
Advanced
Enterprise

Contents

About

Conditional Logic works on an “If This, Then That” basis, meaning you can automate your forms to respond differently based on the input provided. It's a useful way to guide field users through a workflow that is specific to their situation.

For instance, you might want to hide certain form sections until a specific option is selected, or make a form field required based on another field’s answer. These rules can be viewed, created, copied, deleted, and even deactivated for testing purposes.

The topic provides detailed instructions on how to manage these rules, including locating them in the Web Portal and Form Builder, configuring new rules, and removing or duplicating existing ones. It emphasizes the need to test forms thoroughly after any changes to ensure they function as expected.

Overall, Conditional Logic is a powerful tool for creating dynamic, responsive forms that adapt to user input. Read more general information about Conditional Logic.

 

View a Form's Existing Conditional Logic Rules

Conditional Logic rules define how the mobile form behaves (what parts of the form are hidden, shown, required, etc) based on the information provided by mobile users.

When Viewing a Form in the Web Portal 

When you have a form with a lot of Conditional Logic rules and want an overview, this is the easiest way to see all of your Conditional Logic rules in a condensed form.

  1. Locate the desired form in the web portal.

  2. Navigate to the Pages & Questions tab for that form.

    Pages and Questions tab on the form portal page

  3. Scroll down to the bottom of the page, after the table displaying the pages and questions.

  4. View all of the Conditional Logic rules at the bottom, under the Conditional Logic header. Each Logic Element header shows a single rule, with its name, description, and behavior.

    Conditional Logic display for a form

When Editing a Form in the Form BuilderClosed The Form Builder is the tool that form designers use to create forms. In the Form Builder, accessed from the TrueContext Web Portal, form designers can add and edit pages, sections, and questions, as well as attach data destinations and configure the form's settings.

  1. Edit the form to open it in the Form Builder. 
  2. Navigate to the Conditional Logic tab.
  3. Each of the Conditional Logic rules is listed in the left navigation. 
  4. Select a rule on the left to view the details on the right.

Create a Conditional Logic Rule

Conditional Logic rules define how the mobile form behaves (what parts of the form are hidden, shown, required, etc) based on the information provided by mobile users.

  1. Edit the form to open it in the Form Builder. 
  2. Navigate to the Conditional Logic tab.
  3. Select the Add a Rule button in the left navigation.
  4. Configure your rule.

Note: To make sure your Conditional Logic rules work as intended in the field, test them thoroughly before you deploy the form. Test the form under a variety of conditions to validate the field user experience.

Delete a Conditional Logic Rule

If you would like to permanently remove a behavior from your form, delete the desired Conditional Logic rule. Keep in mind that this will affect how the mobile form looks, as well as what information it requires from your field users. It is a good idea to test the form thoroughly after removing a rule.

  1. Edit the form to open it in the Form Builder. 

  2. Navigate to the Conditional Logic tab.

  3. Select the desired rule from the left navigation.

  4. On the right, scroll down to the bottom of the rule.

  5. Select the Delete Rule button, and select it again to confirm.

    Select "Delete Rule" to remove a conditional rule

  6. The rule will be removed.

Copy a Conditional Logic Rule

If you are building a form with multiple pages containing the same questions and requirements, you may need to copy Conditional Logic rules. To copy a Conditional Logic rule:

  1. Edit the form to open it in the Form Builder. 

  2. Navigate to the Conditional Logic tab.

  3. Select the desired rule from the left navigation.

  4. Select the Rule Menu icon 2017-06-27-HamburgerIcon.png next to the rule name.

  5. Select Copy Rule:

    Menu option to copy a conditional rule

  6. The new copy of the rule will appear in the left navigation with a number added to the end of the name:

Note:If you copy a page or section with self-contained Conditional Logic rules (i.e., all conditions and effects are contained within the page or section being copied) then the Conditional Logic will also be copied.

Deactivate a Conditional Logic Rule

You may want to deactivate Conditional Logic rules for testing purposes yet retain the rule configuration in the form. By default, a rule is active.

To deactivate a Conditional Logic rule:

  1. Edit the form to open it in the Form Builder.

  2. Navigate to the Conditional Logic tab.

  3. Select the rule from the left navigation.

  4. Toggle Rule Active to the off position (left).

    List of conditional logic rules with an icon that shows "Brake Light Images" as inactive. This also shows the "Rule Active" toggle set to the off position (left).

Info:The icon next to the rule name in the left navigation indicates an inactive rule. The topic Viewing Form Details describes the Pages & Questions tab, which also indicates inactive rules.