Blog -

How to: Team Registrations with Nested Forms 

the Gravity Forms community By the Gravity Forms community Published November 22, 2022

How To Team Registrations with Nested Forms

Written by the Gravity Wiz Editorial team…

How often do you find yourself wanting to register multiple people from the same form, connect relevant forms, or group repeatable fields together?

Nested Forms by Gravity Wiz simplifies complex forms and the collection of repeatable data.

Here’s an example of what you can do:

  • Easily create “child” forms grouped with “parent” forms where entries are attached to the parent form on submission.
  • Create repeaters to add additional fields to your forms dynamically, and display nested forms conditionally — based on user actions.
  • Pull data from your nested forms into your parent form for powerful, dynamic calculations – like sum, total, and count.
  • Combine with Gravity Forms’ User Registration Add-On and register multiple users at a time in one place.

One great way to explore how to do all of the above is through team registrations.

This could be registering teams for a real world basketball tournament, an esports match, or a dinner party! And the concepts you’ll learn here apply broadly to anywhere you’re registering multiple people — like a webinar, a local concert, or even a conference.

We’ll learn how to quickly add a group of players to a team, configure your form, and, if you’re up for it, do more with each entry — like run calculations and register users to your site, all based on one form submission.

Here’s an example of what we’re about to build – and it takes just a few minutes.

GW 1

Let’s walk through setting that up!

Note: Gravity Wiz is a third-party certified developer and its add-ons are not supported by Gravity Forms. As always, we recommend you extensively evaluate all plugins to ensure their suitability for your purpose before installation on your website.

Step 1: Create a Form for Players or Participants

Start by using the Gravity Forms drag and drop builder to create a form for players, participants, or whatever repeatable user type you are collecting (we’ll stick with “players” for simplicity).

All of the registration information, including contact details for each player will be kept here.

As an example, here are a few fields we can add.

It will look something like this on the front-end:

GW 2

If you want, you can also simultaneously register these users to your WordPress site through the Gravity Forms User Registration Add-On.

Once you have fields like Name and Email in place, create a User Registration Feed and map select fields to register every user submitting your form. To do this, go to Settings > User Registration and add a User Registration feed to map your fields.

We’d recommend having at least an Email field in place (for Gravity Forms notifications), but you can, optionally, add additional fields:

  • Username
  • Name/Nickname/Display Name
  • Email
  • Password
  • User Role (i.e. ‘Subscriber’)

Registering users will allow them to edit their own profile while simplifying user management on your end. It will also open up a list of possibilities for using registered user information elsewhere in WordPress. For example, using Populate Anything, you can populate Gravity Forms data based on the current user.

Step 2: Create a Team Registration Form

Firstly, some important context. We use the terms parent and child to denote a nested form being added to a larger form that houses entries. In this case, the Players form you built in step one is the child form, and we’re housing all entries in the Parent — Team Registration — form.

When a user submits a nested (child) entry, the child entry is created and attached to the parent (team registrations) submission. All information from each player can then be grouped and submitted at once.

Onward!

The premise of our Team Registrations form is simple: add a team’s details and rapid-fire add players in one place.

As a result, we’ll keep fields here focused on a team’s information. The unique player details will take place within each Nested Forms entry — i.e. the Child forms that appear on this Team Registrations form.

Start by adding fields like (for example) Team Name, City, League, and then Players. Note that the Players field will be a Nested Forms field.

GW 3

Step 3: Configure Your Nested Form

With our Team Registrations and Players forms set up, we can customize how the Nested Form displays and collects information within the Parent form.

Step 1: In your Team Registrations form, select the Players form in the Nested Form setting. This will make the Display Fields setting appear.

Step 2: Select the most important identifying fields that you want to appear from the Display Fields setting. Keep it simple!

GW 4 a

Step 3: Change the Entry Labels to something fitting: they will be used to better identify what the nested entries represent within the parent form. For example, change the Entry Label from “Player” to “Players.”

After submitting the form, a child entry is created and attached to the parent submission.

And that’s it. You’re good to start collecting form submissions and start creating teams with Gravity Forms.

If you mapped your User Registration Feed in step one, upon submission of your Team Registration form, all players will also be registered to your WordPress site. If you want more details on setting this up, start here.

Nested Forms also allows you to do things like perform calculations based on signups, create conditional pricing for Nested forms entries, export Nested forms entries in bulk, and a list of other things. The possibilities are limitless.

If you’re still feeling curious, let’s explore some examples of additional things you can do with your team registrations form.

Charge Fees, Create Age-based Pricing, and Manage Teams

Charge fees per player

If we wanted to charge for each player’s registration (for example, a pay-to-play registration process for an online tournament), we could handle this on the Team Registration form.

  1. Add a Product field to the Team Registration form and set the Field Type to Calculated.
  2. Set the Formula setting to the Nested Form field merge tag with a special :count modifier multiplied by whatever fee you would like to charge per player.For example, if you want to count the number of players submitted (the nested field in our example has a field ID of 5) multiply it by 10, your merge tag would look something like this:

GW 6a

{Players:5:count} * 10

Now, the total increases by $10 each time a new player is added.

See an example below (combined with age-based pricing), and try the demo yourself!

Create age-based pricing

You can also adjust the cost per player added based on their age and process the entire registration in a single form submission. The registration form could look something like this:

GW 7

This can be done in a few quick steps with the help of Gravity Forms Date Time Calculator and Gravity Forms Conditional Pricing. Conditional Pricing allows you to create flexible pricing rules based on a user’s previous form actions. To see an in-depth tutorial on this checkout teams with age based pricing in Gravity Forms.

Manage existing teams in Nested Forms

Registering teams is a breeze in Nested Forms. Adding teammates to an existing team and managing them retroactively is a little more advanced — but we have a quick workaround, powered by Gravity Forms Populate Anything. Check out a full video tutorial here if you’re interested.

What Else?

Gravity Forms Nested Forms simplifies adding repeatable data in Gravity Forms and opens up a world of possibilities.

Going beyond just team registrations, Nested Forms can help with real world use cases like:

  • Order forms: Create robust order forms where your customers can order and configure any number of products with a Nested Form field. Capture each product’s total on the parent form automatically for an effortless checkout. Display nested forms conditionally – based on prior user actions like the number of products selected.
  • Insurance quoting forms: Offering insurance? Let users assign multiple beneficiaries via a Nested Form field and collect all the pertinent information for each.
  • Event Registration: Easily add multiple people to any kind of event, and pair this with other Perks for dynamic pricing rules. Pull data from your nested forms into your parent form for powerful, dynamic calculations – like sum, total, and count.

Learn more