How to Show/Hide Multiple Sections Using Conditional Logic
Want to create a form where you can display sections based on a response? For example, if you have a registration form that allows for up to 5 registrants on one form and you need to collect information on each registrant, it is not necessary to show all 5 sets of registrant fields unless the end-user is registering 5 individuals.
With Conditional Logic, you can create forms where the showing of multiple sections is dependent upon a specific selection in a single field.
Creating Field to Determine Number of Sections Displayed
In order to set this up, first create a field asking how many individuals are being registered. You will need to use a dropdown list, checkbox, number or radio button field for this in order to utilize the Conditional Logic feature. For this example, I used a dropdown list.
Next, create your first section with all the necessary registrant information fields (the section header and fields can be added via the Form Builder tools). If you allow 5 registrations on one form, then you can simply click to copy the initial section 4 times. The duplicate icon is the icon with two pieces of paper.
Click on that icon and choose to copy "Section Header and Fields". Repeat for the number of Sections you would like to have. In this example, we are copying 5 Sections.
After you have your 5 sections, you can begin applying logic to each section so the appropriate number of sections appear for the selected number in the dropdown list.
Note: All fields in a section inherit the logic set on the section. You will need to create a select list, checkbox, number or radio button field to utilize the Conditional Logic feature.
To lay this out simply....
Section 1 needs to show if ANY the options 5, 4, 3, 2, or 1 are selected in the number of registrants field.
Section 2 needs to show if ANY the options 5, 4, 3, or 2 are selected in the number of registrants field.
Section 3 needs to show if ANY the options 5, 4, or 3 are selected in the number of registrants field.
Section 4 needs to show if ANY the options 5 or 4 is selected in the number of registrants field.
Section 5 only needs to show if the option 5 is selected in the number of registrants field.
Here's the logic for Section 1. To add this logic, click the + Add Logic button inside each section editor. Use the green "+" sign buttons to add multiple conditions. Remember to toggle to "any" or "all" as needed.
Your form will do this when you're finished: