So you’re using Gravity Forms to collect data and now you need a way to combine information from multiple forms and display it on your website?
In this post, we’ll take a detailed look at our Multiple Forms extension for GravityView. Multiple Forms allows you to combine forms with common field values into one long entry and display that information in a single View.
This is a game-changer for sites that need to aggregate data from multiple sources. Keep reading to find out more! 👇
Sneak Peek
In this tutorial, we’ll combine information from two separate forms to create one, long entry in Gravity Forms. As you can see, we’ll then display that information on the front end using GravityView.
Let’s get started 🙌
What you’ll need
Here’s what you’ll need for this tutorial.
Plugin | Free/Paid |
Gravity Forms (any license level) | Paid |
GravityView (Core + Extensions license) | Paid |
Multiple Forms | Included in the Core + Extensions license |
Why Display Data From Multiple Forms in One View?
There are several reasons why you may wish to display data from multiple forms in a single View.
Combining data from multiple sources is useful if you have a website or app that collects information across two or more forms. Here are some examples:
- You run a doctor’s practice and you have one form for collecting patient contact details and another form for inputting patient health information. Now you want to combine that data into a single table.
- You’re hosting a professional network and each member fills in two forms – one for personal details and another one for their business details.
- You run a nonprofit organization and you have two separate forms. One for collecting member details and another for donations.
Let’s take a look at the Multiple Forms extensions is a little more detail.
Introducing the GravityView Multiple Forms Extension
Multiple Forms is an extension for GravityView that allows you to join data from one or more forms into one, longer entry and display it in a View.
📝 The Multiple Forms extension is still in beta, which means we’re working hard to add new features and improve functionality!
How Does it Work?
Multiple Forms allows you to combine data from two or more Gravity Forms that share a common field to create one, long entry. This works like an SQL join operation.
📝 SQL stands for Structured Query Language. It’s used for retrieving data from a database. If you have multiple tables in your database that share common values, you can retrieve data from both tables using a join operation.
There are four ways to join data together from multiple tables in SQL:
- Left Join – Display all data from form #1, regardless of whether the fields in form #2 have content (supported)
- Right Join – Display all data from form #2, regardless of whether the fields in form #1 have content (not supported)
- Inner Join – Only display entries from form #1 that have values in form #2 (supported)
- Full Join – Display all the entries from both forms (not supported)
The below graphic clarifies how these join operations work.
It’s important to know that the Multiple Forms plugin supports both left joins and inner joins. We’ll show you how to use both in this tutorial.
Installing Multiple Forms
The Multiple Forms extension is included in our Core + Extensions license and All Access license. You can install the extension from inside WordPress. First, hover over Views and click Manage Add-Ons. Now scroll down to Multiple Forms and click Install.
When the extension has finished installing, click Activate.
Displaying Data From Multiple Forms in a Single View
In this example, we have two forms that collect information from clients. The first form (“Client details”) collects the client’s name, email address, phone number, address and the date they joined.
The second form (“Client feedback”) collects feedback from the client in the form of a rating and a short text review.
Our goal is to join these forms together, creating one, long entry and then display that data in a single table using GravityView.
Creating the View
To create a new View, hover over Views and click New View. After giving your View a name, select your first form as the data source.
Now select a View layout. GravityView supports 5 layout types in total depending on your license level (Table, List, DataTables, DIY and Maps).
After selecting a View layout, the View editor will open.
Adding Join Conditions
A join condition allows you to pull data from two or more forms. To add a second form, scroll down to the Data Source meta box and click ‘+ Add Join Condition’.
Now select the form fields you want to join on. The fields you select should share common values, otherwise it won’t be possible to join the two forms.
If you want to join data from more than two forms, simply click the ‘+ Add Join Condition’ again and add a new join operation.
After adding join conditions, you’ll be able to add fields from both forms inside your View layout. This is how you combine data from different forms into a single entry!
Enabling Strict Entry Matching
If you scroll down to the View Settings, you’ll see an option called “Strict Entry Match”. If you enable this setting, your View will only return entries that contain values from both forms.
In other words, enabling “Strict Entry Match” will combine data using an inner join instead of the default left join.
Checking it out on the front end
When you’re finished configuring your View layout, open it up on the front end.
As you can see, each entry contains data from both of our forms.
That’s it!
Display Data From Multiple Forms
If you collect data from multiple Gravity Forms, it can be helpful to combine that information into a single entry and display it using GravityView.
In this post, we showed you how to combine data from two or more forms in Gravity Forms and display it on the front end of your website using Multiple Forms. The Multiple Forms extension for GravityView is a game-changer when it comes to aggregating data from multiple sources.
If you enjoyed this post, check out our documentation to learn more about Multiple Forms.
Join Our Newsletter!📧🙌
✅ Helpful Gravity Forms content straight to your inbox
✅ Be the first to hear about new updates and releases