Passing checkbox values to Mailchimp
Mailchimp’s subscriber list stores more than just email addresses: you can add custom fields for names, cities and other data. But there is no checkbox field type in Mailchimp, which catches many developers off guard when they try to map a Contact Form 7 checkbox directly.
Problem: How do you pass checkbox values from Contact Form 7 (or any form) to Mailchimp?
Solution: Mailchimp doesn’t support checkboxes in list fields. There are two approaches: use Mailchimp Groups to represent the checkbox choices, or collect the checked values into a text field.
Fields, groups and segments
Here is how Mailchimp itself explains the difference:
MailChimp organizes its subscriber data in a specific way: Fields hold information that identifies each subscriber (name, email, city, gender, etc.) — they do not support checkboxes. Groups are used to categorize subscribers by interest or preference, and this is where you can use checkboxes, radio buttons, or dropdowns — for example, “What topics would you like to hear about?” You can then create Segments based on fields, groups, or a combination of both, and send targeted emails to those segments.
Option 1: use groups
If the checkbox answers a question like “What topics are you interested in?”, create a group in your Mailchimp audience with the same options. Groups are made exactly for this: you can later send a campaign only to subscribers who chose a particular option. If you use Contact Form 7 with the Mailchimp for WP plugin, group options can be mapped to form fields in the plugin settings without writing code.
Option 2: save the values to a text field
If you only need to store the answers, add a text field to the audience and send all checked values in it as one string, for example “Design, SEO”. In Contact Form 7 the checkbox value already comes as an array, so join it before sending:
$topics = implode( ', ', (array) $posted_data['topics'] );
You can still build segments on a text field with the “contains” condition, but groups are more reliable for that.
NOTE: In the Mailchimp API v3, groups are called Interest Categories (the group) and Interests (its options). To set them for a subscriber, send the interest IDs in the interests object, for example "interests": { "a1b2c3d4e5": true }.
Sources: