Available on: Professional, Business plans
Mailchimp is an email list management tool and a CRM. It's used to keep track of audiences of any sort, be it clients, potential clients, or content consumers.
When you connect your form to a Mailchimp list, each submission will add the email of the submitter to that list, along with the name, phone number, and address if needed. Multiple submissions with the same email will be ignored, only the first will be added to the list.
Form Setup
Before using the Mailchimp Plugin you must create a form to collect new submissions. Any HTML, CSS and Javascript form will work. Additionally, you can use the following special named inputs to customize the Mailchimp contact.
name="email" (Required)
Adding an input named "email", will set the primary email of the new subscriber in your Mailchimp list. This is the only required property. If the same address gets submitted twice it will not be duplicated in the list.
<input type="email" name="email" required/>
name="name"
Adding an input named "name", or alternatively just "name", will set the first and last names of the list subscriber that will be added. This is an optional field. If you want more control you can also use two inputs, one named "firstName" and the other "lastName" for first and last name respectively.
<input type="text" name="name" />
name="phone"
Adding an input named "phone" will set the phone number of the list subscriber that will be added. This is an optional field.
<input type="tel" name="phone" />
name="address"
Adding an input named "address" will set the street address of the list subscriber that will be added. This is an optional field.
<input type="text" name="address" />
name="_optin"
This is an optional field and only works if you have enabled the "Optin checkbox" in the Mailchimp plugin settings.
Adding a checkbox named "_optin" will trigger the Mailchimp plugin to add a contact to the specified list when checked. If the checkbox is left unchecked, the contact won't be sent to Mailchimp.
<input type="checkbox" name="_optin"/>
name="group"
Adding an input named "group" will add the subscriber to a group. The value sent must be the exact group name case insensitive. If the group name doesn't exist on your Mailchimp account, it'll be ignored.
This is an optional field
<input type="text" name="group" />
name="interests"
Adding an input named "interests" will add the subscriber to group interest. The value sent must be the exact interest name case insensitive. This field requires the group name. If the interests name doesn't exist on your Mailchimp account, it'll be ignored.
This is an optional field.
<select name="interests" multiple>
<option name="Interest One">One</option>
<option name="Interest Two">Two</option>
<option name="Interest Three">Three</option>
</select>
name="tags"
Adding an input named "tags" will mark the subscriber with tags. The value sent must be the exact tag name case insensitive and comma splitted. If the tag name doesn't exist on your Mailchimp account, it'll be ignored. Please make sure to add the tag on Mailchimp before using it. By default, we add formspree tag to your subscribers.
This is an optional field
<input type="hidden" name="tags" value="form" />
Including Additional Merge Tags
If you maintain additional merge fields on your contact list, Formspree will attempt to match the merge fields. You can read more about how to set up custom merge tags on the Mailchimp documentation.
When Formspree attempts to match your field with a Mailchimp merge field, we will look at the user-specified merge field identifier.
For example, if you had had a field named "Source" to track where your sign ups, came from here's how it might look in the Mailchimp dashboard:
When you connect it to your Formspree form, you must match the user-defined Mailchimp merge tag exactly (including capitalization). In this scenario, you should use "SOURCE" not "MERGE5". In your HTML, the field should look similar to this:
<input name="SOURCE" type="text" />
Now, when your contact is created or updated in Mailchimp, Formspree will include your additional merge field information with the contact.
Connecting to Mailchimp
Note: If you're using the Formspree CLI please instead refer to our article Add subscribers to a Mailchimp list to connect to Mailchimp.
Once you've created and configured a form, you can connect to Mailchimp using the Mailchimp Plugin. To do so, first go to the Plugins tab of your form. Then click the Mailchimp Plugin button.
It will trigger a popup that will ask you to connect to your Mailchimp account (even if you're already logged to Mailchimp, they still ask you for your password):
Once you've signed, you'll be prompted to select the Mailchimp list that will be linked to Finish Mailchimp Setup:
Instead of adding a contact to the Mailchimp list each time the form is submitted, the Opt-in Checkbox setting will first check the presence of an _optin special field to determine if the plugin should be dispatched. See the _optin special field section above.
Choose a list and click Connect to enable the plugin.
Once you've connected you'll see the Mailchimp settings modal:
In the future, if you'd like to change the list or disable the plugin entirely, you can do so by clicking on the Mailchimp button again to adjust its settings.