Mailchimp can be used to store your contacts and engage them by sending targeted emails to help grow your business. At minimum, a contact consists of a person's email address. This plugin can add contacts to your Mailchimp audience using data from your HTML form. Need to offer your users opt-in methods or collect custom data fields? This plugin can do that too!
Start by connecting your Mailchimp account by clicking the "Connect Mailchimp Account" button.
This will open a pop-up that will prompt you to sign in with your Mailchimp account and authorize Postform to programmatically access your account.
Once authorized, you will be returned to Postform. Select the audience/list where new contacts should be added when your form is submitted.
Once an audience is selected, you'll be presented with additional configuration options. At minimum, the plugin needs to know which field in your HTML form collects the user's email address. For example, given the following email input:
<input type="email" name="yourEmail" required />
The email field name,
yourEmail, can be specified in the plugin:
By default, this plugin will add a new contact for each form submission. However, it's common to give the user the option to subscribe by using a checkbox input field:
<input type="checkbox" name="subscribe" />
If your form contains an opt-in field, you just need to specify the name of the field. Using the checkbox example above, the plugin can be configured to use the
subscribe field to opt-in:
When a submission is receiveid, Postform will only add a new contact to Mailchimp if the opt-in field has a value.
By checking the "Double Opt-In" checkbox, the user will be added to Mailchimp with a "pending" status. Mailchimp will send an email to the user to confirm they want to be subscribed. The user's status will change to "subscribed" after the "Yes, subscribe me to this list." button is clicked:
For more information, refer to Mailchimp's docs.
In addition to collecting email addresses, you can collect any data points you want in Mailchimp. This can help you send more personalized and targeted emails. In Mailchimp, fields can be managed from the "Audience fields" settings page:
Using the following form as an example:
<form action="https://postform.com/s/FORM_ID" method="POST"> <div> <label for="firstName">First Name</label> <input id="firstName" name="firstName" /> </div> <div> <label for="lastName">Last Name</label> <input id="lastName" name="lastName" /> </div> <div> <label for="email">Email</label> <input id="email" name="email" /> </div> <div> <label for="phoneNumber">Phone Number</label> <input id="phoneNumber" name="phoneNumber" /> </div> <button type="submit">Submit</button> </form>
The plugin can be configured as shown below. Note the input
name attribute is used to map the field in your HTML form to Mailchimp's field.