There are two common methods for building a form that allows users to add more fields:
- Using a Dropdown List field to let users choose how many line items they need
- Using a Radio Button field to let users decide if they would like to add another item
This type of form setup is useful in cases where the end user may be registering multiple people for an event or ordering several items. In the examples below, we use a registration form, but the logic and methodology may be applied to any form type.
Method #1: Using a Dropdown List Field to Let Users Choose How Many Line Items They Need
Step 1: The first method for creating this type of form environment is to ask the end user how many registrants they would like to add. In most cases, you will do this via a required Dropdown List field that contains quantity options. Below, you can see that we've included a required Dropdown List field that asks "How many people would you like to register?" and gives options of 1–10.
Step 2: Next, add a Section field to the form for the first registrant and include any necessary fields under this Section (i.e., Name, Phone Number, Email Address, etc.). When all necessary fields have been added, click on the Section field and choose "Logic" to add Conditional Logic. The Conditional Logic you add should dictate that the Section field should display if ANY number 1–10 of the registrants have been selected from the original Dropdown List field. With the Logic applied to the Section, it will automatically be applied to all fields under the Section. Below is an example of what the correct Logic should look like.
Step 3: The last step is to create additional Sections for each potential registrant. The quickest way to do this is to first save the Section you have already created by clicking on the Section field and selecting "Save this section" at the bottom of the field options.
Saving the section keeps the Logic you've set in tact. Now to create additional Sections, simply find your saved section in the "Saved Sections" area of the builder, click and drag it onto your form, and make any necessary tweaks to the headings, fields, and Logic.
Proceed to add Sections until you have created as many Sections on the form as you would like to provide the end users. When building the form, you may notice it is rather long; however, these fields will be hidden by Logic until the end user needs them.
When you're finished, your form will do this:
Method #2: Using a Radio Button Field to Let Users Decide If They Would Like to Add Another Item
Step 1: With this second method, you first want to build out your form with fields and items as needed (such as the Registrant 1 Section and fields shown below). Once this is done, you want to add a required Radio Button field to the form that asks users if they would like to add another registrant/item.
If users choose "No," they will continue with the form and submission. If users choose "Yes," another Section will appear for them to fill out. To quickly add the second set of fields to your form, click on your first Section header, select the Copy button, and copy the Section headers and fields to create a new Section.
After the second Section has been added, click on the Section heading to add Conditional Logic. The Logic should dictate that the second Section will only appear on the form if the question about adding another registrant has been answered as "Yes."
Continue to make copies of your Sections until you have all the necessary Sections added. Then add/edit the Logic in these Sections so they only appear if the prior field is answered as "Yes," indicating the user needs to add another line.
Helpful Hint: If you need to include several additional Sections, it may be easiest for you to save your original Section so that any Conditional Logic you have set remains in tact. To save the Section and use it multiple times, follow the steps outlined under Method #1 above.
Once you've completed all steps, your form should do this: