There are many cases where you’d need a form that can register multiple users. You could be maintaining departments at a hospital/school, or even simply organising a game that has multiple teams and players. But while it may seem complicated, the process is rather simple!
You don’t need to be a developer or be comfortable with code. With the Gravity Forms User Registration Add-On, registering a user when submitting a Gravity Form is easy. Simply map a couple of fields and any form instantly turns into a user registration form.
If the form already serves another purpose, adding user registration to it streamlines users interaction on your WordPress site. What would have taken two forms now only requires a single form.
In this tutorial, we’re going to take this streamlining a step further with the power of GF Nested Forms to build a user registration form that can register multiple users with a single form – without using shortcodes.
Let’s get started.
- Create a Child Form.
- Add a User Registration Feed.
- Create a Parent Form.
- Add a Nested Form Field to the Parent Form.
We’ll start by creating a Child Form using the Gravity Forms drag and drop form builder. This is where all of the User Registration information will be collected such as contact information and details about their user role.
The Gravity Forms User Registration Add-On makes the whole process a breeze. You can add fields to the drag and drop form builder for every User Registration item you want each new user to supply. Keep in mind, the minimum requirement is an Email field so users can receive email notifications, but you can add new fields to collect any of the following info:
- Name/Nickname/Display Name
- User Role (such as ‘Subscriber’)
It will look something like this on the front-end:
This works as a registration page with a simple registration process.
Once you have created all of the fields for your form, navigate to Settings > User Registration to add the User Registration feed and map your fields. This will help you keep the user’s information organised and uniform
Now that your child form is finished, it’s time to create the Parent form that will contain it. The Gravity Forms User Registration Add-On comes in handy again. The fields you add to the Parent form will only appear once, so they should be used to collect values that aren’t unique per user.
Add a Nested Form field on the Parent form and select your child form in the field settings.
Select which fields from the child form should be displayed in the Nested Form field on the Parent form.
When a user fills out the Parent and Child forms, any new users that are added to the child forms will be registered once the Parent form is submitted. If you want to require new users to activate their user account before registration is complete, check the box in the User Registration Feed you set up above.
In the image above, you can see how we’ve enabled activation via email from WordPress. Users will now receive email notifications for activation. If you want complete control over the activation process, check out Gravity Forms Better User Activation.
Taking It Further
If your user registration has a cost associated with it, you can take this one step further by including the Nested entry totals in the Parent form. Follow the steps in our documentation to get started. The best part is that you can enable this on your WordPress website without using shortcodes!
A common use case for a multi-user registration form is registering a team, similar to our demo in GF Nested Forms documentation. If you’re building a similar form and want to offer different prices based on the player’s age, have a look at our Age Based Pricing article.
A single user registration form that can register multiple users has a lot of benefits:
- It streamlines the data collected
- The activation process protects your site from user registration spam
- It improves the user experience
- You can use it to build a membership site, organise events and games, maintain departmental access and data, etc
The Gravity Forms drag-and-drop form builder combined with Gravity Perks will enable you to register multiple users from a single form on your WordPress site – without using any shortcodes!
Do you have questions or comments about this tutorial? We’d love to hear them!