What would you like to know more about?

Conditional Logic

Learn how widgets use conditional logic to show or hide fields based on people's answers.

Widget use conditional logic to hide or display fields depending on answers to earlier questions. This way, only relevant fields display as respondents work through a form.

For example, let's say you're gathering menu information for a new member luncheon, so you have your new members complete a form. On this form, one question asks "Do you have any food allergies?", and they can select either yes or no. If the respondent selects yes, a follow-up question displays to ask "What are your food allergies?" with an option for the respondent to answer. If the respondent selects no, the follow-up question does not display because that question is irrelevant since they already answered that they do not have any food allergies. This helps you gather the information you need without bombarding respondents with a million potentially irrelevant questions.

Fields

You must configure conditional logic on a field-by-field basis. There is no limit to the number of dependencies that you can configure. Currently, Radio Button Horizontal and Radio Button Vertical are the only supported field types that a form field can depend on.

Note: If a required field is hidden based on conditional logic, it will not be required for that user.

You must configure two fields on a form field record to enable conditional logic:

Depends On
Enter the form field that the current form field depends on. The current form field will display or hide based on a respondent's answer to the form field selected here.
Depends On Value
The exact field value from the selected form field that the respondent must choose for the current form field to display. Avoid extra spaces before or after this value to ensure proper display in the widget.
Note: Fields you select for a Depends On Value must be part of the same form. If the Depends On Values are not part of the same form, your custom form will not work. Consider adding a sub-page view with the following view clause to help find Depends On Value discrepancies.
Form_Fields.Form_ID <> ISNULL(Depends_On_Table_Form_ID_Table.Form_ID, Form_Fields.Form_ID)

For example, if Depends On is set to the form field "How much volunteer experience do you have?", you can configure the following options in field values:

No Experience
Some Experience
Extensive Experience
Keep in mind that each new line in the field values section represents a new radio button in the form:
Image showing an example question "How much volunteer experience do you have?" with answer options of "No Experience", "Some Experience", and "Extensive Experience"

You must set the Depends On Value to only one field value for the current form field to display. For example, "No Experience." The current form field will collect additional information about potential volunteers with no experience.

Image showing an example of the Depends On Value on the Form Field record with the text "No Experience"

Multiple form fields can share the same values for the Depends On and Depends On Value fields. For example, if a volunteer indicates no experience, you can ask additional questions relevant to them. Each form field must be individually configured, even if they depend on the same initial question.

Walkthrough

In this example, you're recruiting volunteers for Dream Team, a community outreach initiative that delivers ice cream and runs a local shop. When people open the form, only one question displays:

Image showing an example question of "Are you a current volunteer?" with answer options "Yes" and "No"

Those who answer "Yes" are asked to share about where they currently serve and pick their preferred Dream Team position. This represents two form fields, both dependent on the same original form field:

Image showing two questions that display after selecting "Yes" to "Are you a current volunteer?", including an open text field for "In which area do you currently serve?" and a multiple choice question for "Select a Dream Team Position"

Research and development is an advanced position, so respondents who select "R&D" will be asked about their other experience:

Image showing an example of the multiple choice question "Select a Dream Team Position" with the answer "R&D" selected, and another question after that of "Do you have scoop shop experience?"

Those without Scoop Shop experience will be encouraged to start in another position before applying to "R&D":

Image showing the question "Do you have scoop shop experience?" with the answer "No", and a message after that saying "We invite you to work in our Scoop Shop before applying to R&D. Thank you!"

Those with Scoop Shop experience are then questioned about their culinary experience:

Image showing the question "Do you have scoop shop experience?" with the answer "Yes", and a question after that asking "Do you have any culinary experience" with the answers "Yes, currently", "Yes, previously", and "None"

On the other hand, those are answered "No" to the original question are presented with an entirely different set of form fields:

Image showing the original question "Are you a current volunteer?" with the answer "No" selected, and a message after that of "Let's get to know you!" with additional questions like "Date of Birth", "Have you joined a Connect Group?", "Have you completed Growth Classes?", and "Preferred Contact Method"