We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here’s a var_dump of the $data variable from the mc4wp_integration_contact-form-7_data hook:
array(4) { ["FNAME"]=> string(5) "First" ["LNAME"]=> string(4) "Last" ["EMAIL"]=> string(14) "[email protected]" ["CHECKBOX1"]=> array(1) { [0]=> string(4) "opt1" } }
And:
ERROR: Contact Form 7 > MailChimp API Error: Bad Request. The resource submitted could not be validated.
Please notify: https://wordpress.org/support/topic/sending-cf7-checkbox-fields-to-a-mailchimp-list/
The text was updated successfully, but these errors were encountered:
MailChimp doesn't really allow checkboxes (multiple values for 1 field).
You can use this filter to "join" the data in the array and send it in on 1 line.
add_filter( 'mc4wp_integration_contact-form-7_data', function( $data ) { $data['CHECKBOX1'] = join( ';', $data['CHECKBOX1'] ); return $data; });
Of course similar technique is possible to set the field in MailChimp to anything else you like based on the data your checkbox returns.
Sorry, something went wrong.
No branches or pull requests
Here’s a var_dump of the $data variable from the mc4wp_integration_contact-form-7_data hook:
array(4) {
["FNAME"]=>
string(5) "First"
["LNAME"]=>
string(4) "Last"
["EMAIL"]=>
string(14) "[email protected]"
["CHECKBOX1"]=>
array(1) {
[0]=>
string(4) "opt1"
}
}
And:
ERROR: Contact Form 7 > MailChimp API Error: Bad Request. The resource submitted could not be validated.
Please notify: https://wordpress.org/support/topic/sending-cf7-checkbox-fields-to-a-mailchimp-list/
The text was updated successfully, but these errors were encountered: