Create a Newsletter Widget with Gravity Forms

MailChimp

I’ve been running a WordPress newsletter here on Do It With WordPress for a few years now. It’s not something I exploit, but every once in a while, maybe once a month, I’ll send out emails about good things that I hear about, whether that’s some excellent content that I’ve found, or a giveaway that you might be interested in (consider signing up ;) ).

Recently, when I decided to add a weekly digest email to my offerings, a single button in the sidebar was no longer adequate (aside from the fact that it probably wasn’t as prominent as it should have been). So it was time for an upgrade.

I decided to build my own signup form, instead of relying on plugins which probably do a whole lot more than I really need them for. I already had all the tools I needed, so I did it myself.

All you need is:

  • Gravity Forms (you’ll need at least a Business license to get the necessary addon)
  • A Mailchimp account (free for first 2000 subscribers)

Once all that’s in order, you’re ready to build your form.

Build the form

Newsletter sign-up formYou really don’t need to collect much information, so building your form will be easy. You’ll need at least an email field, but the rest of it is very much negotiable. I included a name field, because I like to address people in my emails for a more personal touch.

I also have multiple groups to send emails to, so I needed to ask what groups users wanted to be added to (my general newsletter, the weekly digest, or both), so I added checkboxes for those.

That was it. I set up a confirmation, so that people got confirmation that their request was successful and deleted any notifications (I don’t need to be notified every time someone signs up to the newsletter).

Link it to MailChimp

It’s great that you’re getting requests to sign up to your newsletter, but we want to automate adding them to your list, so we’ll install the MailChimp addon.

Once you’ve installed it and linked it to your MailChimp account (under Settings > MailChimp), you can create a “feed” for MailChimp (which will feed data from a form to MailChimp). Go to MailChimp and create a new feed. From there, select which MailChimp list you want to add the user to (it has to already exist), and then match the form fields with the appropriate MailChimp fields. Easy peasy!

In my case, I added some conditional logic for adding people to the right groups based on which checkboxes they checked. You can see my example below.

Creating your MailChimp feed

You can try your form now, and make sure that people are getting added to your list when they enter their information.

Make it a widget!

Lastly, you just need to make it a widget so that you can put it in your sidebar (you could of course put it on a page, or wherever the hell you like really!). If you head over to Appearance > Widgets, you’ll see a Form widget, which allows you to put a Gravity Form into a widget. Just tell it which form you want, and where to display it, and you’re done. You might have a few final CSS edits to make it look perfect, but that’s the gist of it.

You can see the final result in my own sidebar, and of course, if you’re so inclined, you can try it for yourself, and sign up to my infrequent, really-not-annoying, just-good-content newsletter.

Get your Gravity Forms licenseGet going with MailChimp – for FREE

Leave a Reply