In this tutorial, I address a user request. A couple of times in the last week, I’ve seen Gravity Forms users asking how they can add a newsletter opt-in option to their forms.
Requirements
You will need the following three things to implement this on your site.
- Gravity Forms (any license)
- An Email marketing service (i.e. Mailchimp, Kit, Constant Contact, Aweber, etc)
- The matching add-on
This tutorial will not cover installing plugins or setting up your add-ons, which is documented well enough at docs.gravityforms.com.
I’ll use Mailchimp in this tutorial, but this same process will work for any email marketing services.
The Consent Field
In this tutorial, we will add a consent field to the form.
You could use a standard checkbox or radio button field. However, I do not recommend using a radio button field because once you make a selection, you can undo it without refreshing the page.
The Add-On Feed
The next step is to create a feed for your email marketing platform add-on. In my case, I am using Mailchimp.
This feed is what pushes form data to your email marketing list. This is what we want to control. We only want this to send the user data when the check the censent box we added in the previous step.
The Conditional Logic
To control when the feed is processed we must enable the fedd conditional logic.
We want to process the feed when the consent field is checked so your logic should be configured as shown in this image.
Form in Action
This demonstration video will show this process in action, and to verify it is working, I even review the logs with you.
The Wrap Up
There you have it, a simple way to add an newsletter opt-in consent to any form. You only need a Gravity Forms form, an email marketing service, the corresponding add-on, and some conditional logic.
If you need help or have questions, please use the comments below.