Groups in Contact Form 7
-
I am looking for a way to be able to automatically add someone who submits a Contact Form 7 to a “Group” within an “Audience” in Mailchimp.
I was helped by someone working for Yikes quite some time ago. He helped me add someone to an “Audience” upon Contact Form 7 submission.
Here’s the code he came up with to be added to functions.php:
function cf7_change_MC_list( $list_id ){ $cf7_form_id = isset( $_POST['_wpcf7'] ) && ! empty( $_POST['_wpcf7'] ) ? filter_var( $_POST['_wpcf7'], FILTER_SANITIZE_NUMBER_INT ) : 0; if ( (int) $cf7_form_id === 111111) { return "1a11a11a1a"; } return $list_id; } add_filter( 'yikes-mailchimp-checkbox-integration-list-id', 'cf7_change_MC_list' );
It works beautifully when this was included in the contact form:
[yikes_mailchimp_checkbox]
I would appreciate a way to drill down to a specific “Group,” if possible.
Is this something you could please help me with?
Thank you so much.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Groups in Contact Form 7’ is closed to new replies.