How to Create Conditional Logic

Conditional Logic allows a form creator to build a dynamic form that is customized to a particular respondent and their responses.

Step 1. Choosing the Form Element

Conditional Logic can be created by using one of these three form elements: “Dropdown Select”, “Single Choice”, “Multiple Choice”, and “Checkbox”. Just drag and drop the element into a row:

Visual representation of conditional components in HIPAA form builder

Step 2: Creating the “If” question.

Conditional Logic uses “if-then” logic to dynamically reveal fields in a form. As an example, using the “Single Choice” element, we’ve created the question “Are you allergic to any kind of food?”. This question has two potential answers: “Yes” or “No”.

Sample single choice question in HIPAA form builder

Step 3. Adding a New Row and Choosing the “Then” Element 

Conditional Logic applies at the “Row” level. Therefore, you must click “+ Add Row” before choosing a conditional “Then” element.

Choose an appropriate element that should be filled-in or actioned, depending on the response to the “If” question from Step 2. In this example, we’ve chosen the “Input Field” element. Drag and drop this element as shown in the screenshot.

In this example, we used “Input Field” because we would like to know what kind of food the respondent is allergic to. Depending on the use case, any other appropriate element could be used.

Drag and drop 'Then' component to create conditions in HIPAA form builder

Step 4. Customizing the “Then” Element

When you drop the element, its settings window will open. In this window, you can adjust the “Label” to pose the “Then” question. In this example, the new “Label” becomes: If yes, please specify.

ettings for 'Then' component in HIPAA form builder

Step 5. Opening the Conditional Logic Window

Just above the border of the “Then” or “Input Field” element row, click on the “Conditional Logic” icon.

Icon to represent conditional logic in HIPAA form builder

Step 6: Creating Conditional Logic and Linking Elements

Upon clicking on the “Conditional Logic” icon, the settings window opens to create the conditional logic. The following four fields must be completed to ensure the proper display and linkage of the elements. 

  • Actions – what action do we want to result from a given answer to the “If” question. In a dynamic form, we have two options, either “display” a field or “hide” a field.  

      For the form in the example, the default setting for the “Then” question is that it is hidden. Therefore, we only want to “Display” the “Then” question, if the answer to the “if” question is “Yes”. To do so, choose “Display” in the settings.

  • Condition Component – Choose the “If” question or element that triggers the conditional logic.

      For the form in this example, we only have one element or field, “Are you allergic to any kind of food?”.

  • Condition – Choose “equal” or “not equal” (in case of the “Dropdown Select”, “Single Choice”, and “Checkbox” conditional components) or “equal” or “contains” (in case of the “Multiple Choice” conditional component) to the “If” question to initiate the “Display” or “Hide” “Action”. 

      For the form in this example, we’ve chosen “Equal”, since we want to “Display” the “Then” question if the answer to the “If” question is “Yes”.

  • Component State – Choose the desired answer to the “If” question that we’ve linked to above in order to complete the Conditional Logic process.

       For the form in this example, we want the Conditional Logic process to display an additional field when a respondent answers “Yes” to the “If” question.

If the answer to the “If” question is “No”, the “Then” question will remain hidden.

Once these fields have been completed, select “Save Changes”.

Configuring conditional logic in HIPAA form builder


Upon Clicking “Save Changes”, you are returned to the Form Builder and the Conditional Logic has been created. The screenshot below shows how an element that is subject to Conditional Logic “Display” appears in the Form Builder.

Hidden component placeholder in HIPAA form builder

Editing Conditional Logic Fields

Step 1. Open the Form Builder and go to the Conditional Logic Element you would like to edit.

Example of a conditional component and 'Then' component in HIPAA form builder

Step 2: Click on the Conditional Logic icon:

Conditional logic icon for 'Then' component in HIPAA form builder

Step 3: Change “Actions” field to “Hide”.

After choosing “Hide” instead of “Display”, click on “Save Changes” and you will be returned to the form builder.

Editing actions in HIPAA form builder

The “Conditional Logic” element is now visible and ready for editing.

Visibility of conditional logic component in HIPAA form builder

Previewing and Testing Conditional Logic

Step 1: Previewing in the Form Builder

Click on “Preview” in the Form Builder to see what the form will look like for a respondent: 

Switch for preview in HIPAA form builder

Step 2: Only a single question is visible.

In the preview, the respondent initially sees only one question.

Example of enabled preview in HIPAA form builder

Step 3: Conditional Logic triggers display of an additional field

You can see how the response to the first question of “yes” (1) leads to the displaying of the additional field “If yes, please specify” (2).

Conditional components in preview mode in HIPAA form builder

Finished! Press “Save”, then “Publish” to share or embed the form.

Still have questions? Contact us

Leave a comment