-
Show sign-up form from theme files
To show a sign-up form from the PHP files in your WordPress theme, you can use the mc4wp_show_form() function.
-
Show sign-up form in sidebar or footer
In most WordPress themes, the sidebar and footer are so called widget areas. This means that you can use the dedicated “Mailchimp for WP Form” widget to show a sign-up form in these areas.
-
Show sign-up form inside a post or page
Showing a sign-up form in your WordPress posts or pages is as easy as copy-pasting the following shortcode in your post editor.
-
JavaScript form events
Mailchimp for WordPress triggers various JavaScript events whenever your visitors interact with a sign-up form on your site. These events can be used to run custom code, for example to track form sign-ups with Google Analytics.
-
Track form events with Google Analytics
The plugin makes it easy for you to interact with the various form events and run a piece of code, like tracking the event with Google Analytics.
-
Add CAPTCHA to forms
As of version 4.7 of Mailchimp for WordPress it is no longer possible to add Google reCAPTCHA to your forms. Don’t worry though – you probably do not need it anyway.
-
Add CSS class to form element
Using a filter hook to add or remove CSS classes to the form's HTML element.
-
Add custom form validation
It is possible to add custom form validation logic to any form created by the Mailchimp for WordPress plugin using a filter hook.
-
Add Mailchimp subscribe form to all posts automatically
To automatically add a sign-up form to all your posts, go and edit the form you would like to show and open up the Settings tab.
-
Add variables to redirect URL
You can pass variables from your form to the page your form redirects to. This way you can, for example, thank subscribers by name after they’ve succesfully filled in your form.
-
Adding tags to Mailchimp subscribers
How to add subscriber tags when signing up using a form.
-
Accepted form shortcode arguments
The Mailchimp for WordPress plugin comes with a shortcode that allows you to place a sign-up form just about anywhere. You can put a shortcode in a Post, Page or Widget to display the form to website visitors in that position.
-
Block spam sign-ups
By default, the Mailchimp for WordPress plugin uses various techniques to prevent spam sign-ups. Unfortunately, some spam-bots are smart enough to get through and more actions might be required. Bots are getting smarter everyday and sometimes even target your sites in a specific way.
-
Change position of form response
You can change the position of success and error messages using the {response} tag or by using the mc4wp_form_message_position filter.
-
Conditional fields or elements
Mailchimp for WordPress supports conditional fields or elements by using two special attributes: data-show-if and data-hide-if. The attribute value can be either just a field name or a field name followed by a colon and the expected field value.
-
Duplicating a sign-up form with its settings
Sometimes you will want to copy over all the work you’ve done on a sign-up form and take all its settings with it.
-
Email notifications for forms
How to send an email notification for every successful form submission.
-
Google Tag Manager tracking
You can use Javascript Events to track form interactions.
-
Make Interest Groupings a required field
If you include an interest grouping in your sign-up form using checkboxes, you may want to enforce your visitors to select at least one interest.
-
Populate fields with URL data
If you want to populate certain form fields with data from the request URL then you can do this using what we call dynamic content tags. There are various built-in tags available, but the one we’ll need to retrieve data from the URL is {data key="NAME"}.
-
Single-line horizontal forms
The CSS Styles Builder mentioned in this article is a Premium feature.
-
Split up address fields
Mailchimp splits up address fields into separate fields by default, something the field generator in the Mailchimp for WordPress plugin does not yet also support (as of version 4.0).
-
Styling input placeholder text
What’s a placeholder?
-
Unsubscribe forms
Since version 2.7 of Mailchimp for WordPress, you can use the plugin forms for handling unsubscribes straight from your WordPress site.
-
Using Radio Buttons For List Choices
If you would like to make your subscriber select only one of your available list, one way to do so is to offer radio buttons instead of checkboxes.
-
Using variables in your form or messages
A relatively unknown feature of the plugin is the fact that you can use certain variables inside your form, your form success and error message or even the checkbox label text for some dynamic content.
-
Validating "birthday" fields
The plugin uses HTML5 input fields and will by default use a regular “text” field for fields marked as “birthday” fields in Mailchimp.
-
What does "replace interest groups" do exactly?
When you enable the update existing subscribers setting in any sign-up method, another setting labelled replace interest groups appears.