A Nested Form is essentially a form within a form. They’re very useful for when you want to create a registration form for an event or sport, collect repeatable data, or when you need to perform calculations on repeatable data. If you’re using Nested Forms on your WordPress website, you might worry about organising and understanding your form data. Thankfully, it is easy to export Gravity Forms!
One of the most common requests we get is how to export Nested Form entries. Keeping your form entry data systematic and accessible has always been a key part of Nested Forms, and we baked that right into our form export feature. In this tutorial we’ll walk through the different options available to export Gravity Forms.
Let’s get started.
In this example, we’re going to look at how to export Gravity Form entries for a registration form for in-store gaming events. A user fills out some basic date and time info at the top of the form, adds participants into a Nested Form, and decides on refreshments. Costs associated with the size of the party and refreshments is automatically calculated, and when the customer submits the form they are registered for the event.
How To Export Your Nested Forms
Exporting your form entries with Nested Forms is similar to exporting form entries for any form.
- Navigate to Forms > Import / Export from your WordPress dashboard.
- Open the Export Forms tab.
- Select your form from the drop down.
Gravity Forms will show every available field for export, and if the form contains a Nested Form field it will show the Nested Form Field and the child fields.
How Do Nested Form Fields Export?
Before we get started with the export, let’s understand how Nested Form Fields export and what each of the options gives us.
In my Parent form, I have a Nested Form Field called “Party Members”.
On the Export page, this field is available as an exportable field.
With that option checked, this is what is exported into our CSV file.
The numbers that display here are the Entry IDs for each Nested Form entry. Numbers on the same row belong to a single Parent entry. This is useful information, but it can be omitted depending on why one is exporting the form.
Exporting Child Form Fields
Along with the Nested Form Field, Child Form Fields can also be exported.
When these fields above are checked, the CSV file displays the child field entries as separate columns.
Here, each block represents child entries that belong to a single Parent entry.
Putting It Together
With that context, let’s get back to understanding how to export entries for our game night. In our case, we want to export every field from the Parent form and also the child form fields from the Nested Form, but we don’t need to export the Nested Form field—the Entry IDs aren’t important for this export.
The export file that we get with these settings is a nice combination of the Parent and Child form values. We can use Excel to get a simple yet detailed overview of the parties in our game.
Now that’s a good-looking export file. We’re all set to play!
Taking It Further
So far we’ve seen how nested form exports work and how to export child form fields to get an organised export file. For those curious about applying automatic calculations, we are doing this with a WordPress plugin called Gravity Forms Copy Cat.
Automatic Calculations Using GF Copy Cat
In order to handle the registration calculations in this example, the form is using a combination of the :count merge tag modifier which adds the total number of child entries attached to a Nested Form field and GF Copy Cat – a plugin that copies values from one field to another within the same form.
There’s a Number field in the Parent form called “Party Count” that uses a merge tag to calculate the number of people in a party.
That same field then uses Gravity Forms Copy Cat to automatically copy its value into the quantity sub-field of a Product field, like refreshments.
This is same functionality you see in practice in the GF Nested Forms demo.
We’d love to hear from you. Leave a comment below!