Let’s say you want to automatically check the choices in a Checkbox field when a specific choice is made in another field on the same form. For example, you operate a service-based business, like a car wash, that offers customizable packages. Each separate service you offer is a checkbox in the form, but if a package is selected then certain choices need to be selected automatically.
In this tutorial, we’re going to show you how to create choice-based fields that will conditionally check themselves.
Setting up the form first requires you to create a mapping form. This will be used to map out all of the possible combinations where you want the Checkbox field’s choices to be checked. Then, we’ll duplicate that form and build our user-facing form. Let’s dive in.
Step 1 – Create a Mapping Form
We’re going to make a form to store our source values. Then, we’re going to map that field to identical fields in my user-facing form.
For this tutorial, we’ll be making a form for a car wash. When a wash package is selected, the checkbox field below will select all of the services included in that package.
Begin by adding a Drop Down field to your form and set the choices for that field.
Then, add a Checkbox field to the form. In this field, add all of the different wash services you offer.
Step 2 – Submit Form Entries
With the fields in place, submit form entries with the different combinations of Wash Packages and included Services. I have three Packages, so I will make three submissions.
Here’s all of my submissions on the Entries page.
Step 3 – Duplicate the Mapping Form
With the entries submitted, duplicate the Mapping Form to use as a template to build the new form. This saves you time and ensures that the fields in the user-facing form match the mapping form exactly.
Step 4 – Map Your Fields
In the duplicated form, use Populate Anything to populate the value from the mapping form into the Checkbox field. Filter the value so the Drop Down from the mapping form matches the value in the Drop Down for this form.
With the field mapped, the user-facing form will automatically check the appropriate Checkboxes when a Package is selected in the Drop Down.
Taking it Further
As you can see, by using Gravity Forms as a database to store pre-selected values you can build complex interactive forms that will save you time and wow your customers.
Use the same method above for other choice-based fields, such as Drop Down and Radio Buttons. The possibilities are endless.
If you’re looking for other ways to use Gravity Forms as a simple database, check out Using Gravity Forms as a Simple Database.