Saltar al contenido principal

Conditional Logic

In DSPTCH forms, you can use conditional logic to dynamically show or hide questions based on user responses. For example, you might hide follow-up questions or entire sections unless a user selects “Yes” to a specific prompt. You can also display different sections of a form based on a selected dropdown value, such as the user’s division. This guide provides examples and step-by-step instructions for setting up conditional logic in your forms.

To learn more about creating forms in general, check out our main guide on creating custom forms here

How to access the conditional logic menu on a question

To access the conditional logic panel for a form, you would click the "Conditions" menu on the sidebar.

Form designer with the sidebar arrow and Conditions menu icon circled to show how to open the conditions panel

To open the sidebar menu, click the arrow at the top (circled in Blue). To open the Conditions menu, click the chained arrows icon (circled in red)

Once at the conditions menu, click on the wand above to open the menu.

Conditions panel with the wand Edit icon circled in red to open the condition settings menu

Clicking the wand will open the settings menu

From the conditions settings menu, you will select a question, condition, and response that you want to be met.

Make the panel visible if dialog with the question selector, condition operator, and Apply button

condition settings menu

Condition dialog with the question dropdown open showing available form questions to choose from

Selecting a question from the menu

If you do not rename your questions in the Question name field, they will show up as a name like "question1"

After selecting the question, you can choose the condition type.

Condition dialog with the operator dropdown open showing Equals, Any of, Greater than, and other operators

Selecting a condition type from the menu

After choosing the question and condition type, you can then choose the answers to the question that will meet the condition.

Condition dialog with the Any of operator showing Wind, Solar, and BESS checkboxes selected

Selecting the answers that meet the condition


Examples

Example 1: Showing a question based on a Yes/No response

In this example, we configure a question to appear only when the preceding question is answered with “Yes.”

Demo of setting up a question to appear only when a Yes/No question is answered Yes

See the interactive version of the demo here.

Example 2: Using a dropdown to branch a form into multiple paths

In this example, the form is divided into two paths based on the user’s selection in a dropdown question. This is achieved by using a Panel component and applying conditional logic to the panel itself. All questions within the panel remain hidden until the specified condition is met.

Demo of setting conditional panel visibility based on a Service Line dropdown selection

See the interactive version of the demo here.