The Mailchimp for WordPress (MC4WP) plugin connects Contact Form 7 to Mailchimp. Beyond a simple “subscribe me” checkbox, you can target a specific audience list and a specific interest group within that list — all with hidden form fields.
Problem: Contact Form 7 has no native way to subscribe form submitters to a Mailchimp audience — especially when different forms on the same site need to add users to different lists or interest groups.
Solution: Use the Mailchimp for WordPress plugin — connect your API key under MC4WP settings, then configure each CF7 form to subscribe submitters to the correct list and optional interest group using the form integration tab, with no custom code required.
Install and activate both Contact Form 7 and Mailchimp for WordPress, then connect your Mailchimp API key under Mailchimp for WP → Mailchimp.
In your CF7 form, add hidden fields to target a specific list and interest group, plus a visible opt-in checkbox:
<!-- Target a specific Mailchimp audience (list) -->
<input name="_mc4wp_lists[]" type="hidden" value="de58a2b77d" />
<!-- Target a specific interest group within that list -->
<input name="mc4wp-INTERESTS[ac42cwe23s][]" type="hidden" value="ece5cb5ed1" />
<!-- Opt-in checkbox — only subscribe if the user ticks this -->
<label>
<input type="checkbox" name="mc4wp-subscribe" value="1">
Sign me up for news, offers, and events.
</label>
To find your list ID and group IDs: in MC4WP go to Mailchimp for WP → Form, open the field helper, and browse your lists and interest groups. The IDs are shown next to each item.
If you want to subscribe users unconditionally (without a checkbox), replace the checkbox with a hidden field:
<input type="hidden" name="mc4wp-subscribe" value="1" />
Map CF7 form fields to Mailchimp merge fields (e.g. FNAME, LNAME) in Mailchimp for WP → Forms → Field Mapper, or use the mc4wp_form_data filter in code:
add_filter( 'mc4wp_form_data', function( $data ) {
if ( ! empty( $data['your-name'] ) ) {
$parts = explode( ' ', $data['your-name'], 2 );
$data['FNAME'] = $parts[0];
$data['LNAME'] = $parts[1] ?? '';
}
return $data;
} );
NOTE: If users are being subscribed without ticking the checkbox, check that no other form on the same page has a hidden mc4wp-subscribe field. MC4WP processes any form submission that contains its fields, regardless of which CF7 form triggered it.