Some of the most common uses for forms are registering children for various programs, from swim lessons to tennis camp. Those registration forms need to capture information about the parents as well as information about each child and what they're registering form.
With nested forms you can simplify the registration process by creating one form that collects the child information (referred to in this tutorial as the child form) and one form that collects the parent information and aggregates the information from one or more child forms (referred to as the parent form).
When you use nested forms you only publish the parent form on a page on your site. The child form entries are presented as a table within the parent form along with a button to add additional child form entries. The child form is then opened in a modal window.
The official documents for using Nested Forms can be found here: https://gravitywiz.com/documentation/gravity-forms-nested-forms/
When you click on Add Swimmer you see the following:
Step 1: Create the Child Form
For this example we'll create a swim lesson registration form. For each child who is being registered we want to collect a name, date of birth and which of three sessions they are signing up for.
That results in a form that looks like this:
In practice you're likely to collect much more information, such as swimming ability, etc. This is just a simplified example.
Step 2: Create Parent Form
Next we'll create the parent form. We want to collect a name, email and phone number for the parent who filling out the form. We'll also add the Acct ID field from the Member Splash Fields group. This is a hidden (by default) field that adds the account number of the member completing the registration to the form entry if they are logged in. If you are allowing non-member registrations or not requiring members to log in before registering this field will simply be empty.
Step 3: Add the Child Form to the Parent Form
In the parent form, click on Advanced Fields and choose Nested Form.
Once it is added to the form, click on it to edit and note that there is a dropdown for you to select which Nested form (child form) this field should display information from.
The fields you add here do not affect the information that is captured, it is just a summary view of the child form entries. You might only want to show each child's name and the session they are registered for on the parent. It in no way affects the data that is saved.
Step 4: Collecting Payment
In our example suppose you are registering three children for various levels of swim lessons. You want to be able to make a single payment to cover all three. This can be done by adding a Product Field to the parent form (found under the Pricing Fields field group).
For the Field Type choose Calculation. Check the box next to Disable quantity field. Finally, you're going to use the Insert Merge Tag selection to add a field from the child form. Back in Step 3 we set labels for the child form entries, Swimmer for singular and Swimmers for plural. The merge tags use the plural version + the field ID from the child form. The one with :total appended at the end will automatically total up all child form amounts.
Now you can add a Total field and credit card field. Your final form will look something like this:
There are many more things you can do with Nested Forms but this should make the basic concepts clear.
For an example of a robust swim lesson registration page and form view this demo: https://demo.membersplash.com/teams-lessons/swim-lessons/
You can also download the parent and child forms used in that demo by clicking on the attachment below and importing them into your site by going to Forms -> Import Export -> Import Forms. They can then be used as the basis for creating your own registration forms.