Select Page

All Your Opt-Ins on a Single Form with Gravity Forms

Description

Creating a separate sign up form for each opt-in you offer can get unwieldy. Combine all your opt-ins on a single form with Gravity Forms.

This post may contain affiliate links. If you purchase something through one of these links, I will receive a small commission at no additional cost to you. Your trust is important to me and I only recommend products that I have tried and believe in. Read my full disclosure statement here.

Tools Used

i

Gravity Forms - Any License

Form

Use Case

If you offer multiple content upgrades on your site through an opt-in form from your email marketing provider, you may be starting to feel overwhelmed by the number of forms you are managing that all do practically the same thing – I know I did! Luckily, Gravity Forms integrates well with a number of email marketing platforms through the Gravity Forms Add-Ons.

Read through the steps below to set this up for yourself and test out the form for yourself at the bottom, or just download the form already built right here.

Steps

Step 1: Set up Your Fields

Include at least email and a single line text field. You can add any other fields you would like to collect: first name, last name, company, job title, opt-in check box, topics of interest, etc. Set the single line text field to hidden on the Advanced tab (though you may want to keep it unhidden until you are done testing the form). Once your fields are set, you can move on to Step 2.

Step 2: Setting Up Dynamic Population

In order to use the same form for every opt-in, we need to have a way of knowing which opt-in the form is being filled out for. We will do this using dynamic population, specifically query string dynamic population. This allows us to add a code into the form url, which will populate our hidden field.

First, click on the Advanced tab in your hidden field and select “Allow field to be populated dynamically.” This will open a new field called Parameter Name. I prefer to use a single word in this box. If you feel the need to use multiple, make sure to use a hyphen (-) or an underscore (_) to connect the multiple words – this will be used in the url so there can be no spaces.

Here is what the box looks like with the Parameter Name field filled in.

Step 3: Creating Your Form’s URL

First you’ll need to add your form to a page in order to have a URL for your form. Once you have the form’s URL, you can add the query string at the end to prefill the hidden field.

To pre-populate the hidden field add “?your_parameter=value”.

In this case the form’s URL is  https://builtwithgravity.com/opt-in-sample-form/. My parameter name is “optin” and I’m going to call my opt-in “sample form” so my final URL will look like this:

https://builtwithgravity.com/opt-in-sample-form/?optin=sample%20form

Note:

Step 4: Making it Work

Now that you have the basics down, add a link to the form on every page on your website that offers an opt-in. Customize each link by adding the query string with a unique opt-in name that will feed through to your hidden field.

Now your form is telling you which opt-in your new subscribers are selecting, but what do you do with that information? That’s where Gravity Form’s Add-Ons come in. Install the Add-On for the email marketing platform that you use. If yours isn’t available, you may need to upgrade to the pro version of Gravity Forms to get access to the Zapier Add-On. Through Zapier you should be able to connect to any service you use. For the purposes of this tutorial I’ll assume that you are using a Gravity Forms Add-On. If you have to use Zapier instead, the Zapier Support Team has great documentation and email support to help you set up your new zap.

I will be setting this up with the MailChimp Add-On, but the process should hold true for any similar service.

 

When editing your form, go to Settings > MailChimp, then click the Add New button next to MailChimp Feeds. Give your feed a name. I called mine “Opt-in”. Select the appropriate list from your account, then match up the fields from your form to the fields in your account. Next click the button next to the Tags field (it has an arrow pointing toward three lines). From the dropdown choose your hidden field. This will now send the info that you have prepopulated through your query string over to MailChimp.

In MailChimp you can now set up your automation to run based on new tags added for subscribers.

Form Installation

You can download and install the form yourself here, but if you need some help or would rather have someone else do it for you, I’m here to help. Just click the button below to fill out the request form and I’ll be in touch shortly.

Submit a Question or Comment

0 Comments