Your Knowledge Base has moved to the new Help Center.  Check out the release notes for details. And don't forget to update your bookmarks and in-house documentation before May 28.

Conditional Logic

it-directors
 

To begin using the Custom Form Widget, see the Custom Forms Configuration.

Basics

Widgets support conditional logic by displaying/hiding fields dependent on answers selected to earlier fields. This allows fields to be displayed in a targeted manner as Respondents work through a Form. For example, if Respondents must choose between either Option A or Option B, selecting Option B may reveal a handful of additional questions relevant only to Option B. 

Fields

Conditional logic must be configured on a field-by-field basis. There is no limit to the number of dependencies that may be configured. Currently, the only supported Field Types on which a Form Field may be dependent are Radio Button Horizontal or Radio Button Vertical ("Option Lists" in the Form Editor Tool). Two fields must be configured on a Form Field record to enable conditional logic:

  • Depends On: Indicate the Form Field on which the current Form Field is dependent. The current Form Field will be shown/hidden based on a Respondent's answer to the Form Field selected here. 
  • Depends On Value: The singular Field Value from the selected Form Field which the Respondent must chose for the current Form Field to be shown. Ensure there are no extra spaces in this value- these will prevent the fields from appearing in the Widget.
  • Note: If a Required field is hidden based on conditional logic, it will not be required for that User.
Note: Any fields chosen 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 Subpage View with the following View Clause to help locate 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 Form Field "How much volunteer experience do you have?" the following options may be configured in Field Values:

No Experience
Some Experience
Extensive Experience 

Keep in mind that each new line in Field Values represents a new radio button when rendered in the Form:

The Depends On Value must then be set to a singular Field Value - for example "No Experience" - for the current Form Field to be displayed. The current Form Field will collect additional information about potential volunteers with no experience. 

If desired, multiple Form Fields may share the same values for Depends On and Depends On Value. For example, when a potential volunteer indicates they have no experience, 3 additional questions should be posed, which would not be relevant for volunteers with some or extensive experience. Each of those 3 Form Fields needs to be configured individually, though each is configured to depend on the same original question. 

Walkthrough

In this example, volunteers are being recruited for 'Dream Team' a community outreach initiative that delivers ice cream and operates a local shop. Originally only a single question is displayed:

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:

Research and development is an advanced position, thus Respondents who choose 'R&D' will be asked about their other experience:

Those without scoop shop experience will be encouraged to start in another position before applying to 'R&D':

Those with scoop shop experience are then questioned about their culinary experience:

On the other hand, those are answered 'No' to the original question are presented with an entirely different set of Form Fields: