Support » Plugin: Easy Forms for Mailchimp » Contact 7 Integration not working

  • Resolved arabtornado


    Hi Kevin, How are you?

    I was trying to use the contact 7 integration but cant get it to work, here is my form code

    [tel* Order-ID class:gift_form_field placeholder 'Amazon Order ID - E.g. "304-2598420-4785453"']
    [email* your-email class:gift_form_field placeholder "Email Address"]
    <h1 class="gift_form_header">Customer contact details</h1>
    [text* first-name class:gift_form_field placeholder "First Name"]
    [text* last-name class:gift_form_field placeholder "Last Name"]
    [text* Street class:gift_form_field placeholder "Street"]
    [text* House-Number class:gift_form_field placeholder "House Nr."]
    [text Address class:gift_form_field placeholder "Add. Information"]
    [text* Postal-Code class:gift_form_field placeholder "Postal Code"]
    [text* City class:gift_form_field placeholder "City"]
    <div class="gift_form_newsletter_div">
      [acceptance Newsletter class:gift_form_newsletter optional] Yes, I would like to participate in gift and discount promotions. [/acceptance]
    [submit class:gift_form_submit "Submit"]

    and i enabled the contact 7 integration and chooses the mailchimp list from the integration setting, And I receive the contact 7 success message but nothing sent to mailchimp.

    Also im wondering if its possible to prevent the integration from updating a specific field when resubmit… i will explain..
    I plan make the integration checkbox enabled by default and hide it with css so i send all contacts to mailchimp but also i plan to send the value of the Newsletter checkbox shown above to mailchimp so on mailchimp list there will be a mergetag called newsletter that determine if that contact checked that newsletter acceptance checkbox or not. but the problem here is that im worry that a user check the checkbox after submitting his details for the first time and the newsletter mergetag value become “1” or checked and later he resubmit again and the integration update the contact making the mergetag value is unchecked “blank value” so im wondering if there is a way to prevent updating that checkbox value on mailchimp or prevent updating all contact info on mailchimp if its not posible to disable it for just the checkbox.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor yikesitskevin


    Hi @arabtornado,

    I’m well. Thanks for asking 🙂

    The integrations can be finicky. Let’s try getting the integration to work before trying to customize it.

    A few common errors when testing integrations:

    Double Opt-in
    All of our integrations are double opt-in by default. If you’re using a fake email address to test the integration, there will be no opt-in.

    Required Fields
    The CF7 integration only submits user emails when subscribing. MailChimp will reject the subscription if you have any fields (in MailChimp) defined as required because these fields will be empty.

    An already subscribed/unsubscribed/deleted email
    I can’t remember the exact state of this, but there are some issues when trying to re-subscribe an email that is already subscribed/unsubscribed/deleted. If you’re using one of these emails to test, please try a different email.

    Finally, please turn on our debugging tools (instructions here: while testing. After addressing the above concerns, run another test and let me know if any warnings are shown.

    Thank you,

    Thread Starter arabtornado


    Hi Kevin,

    You are right, The issue was that i didn’t notice that the integration is a double optin unfortunately.

    is it possible to make the contact 7 integration to work with single optin?

    PS: I plan to send all contacts to mailchimp to send them a confirmation email after specific period of time.

    Thank you

    • This reply was modified 2 years, 4 months ago by arabtornado.
    Thread Starter arabtornado


    I’m sorry kevin for not searching before asking, just found that reply from you on old post which worked nicely now the first part of my question is solved.

    Now im wondering if it possible to prevent updating mailchimp contact for specific mergetag (Newsletter checkbox value)?

    add_filter( 'yikes-mailchimp-checkbox-integration-body', 'set_integrations_to_single_optin', 10, 2 );
    function set_integrations_to_single_optin( $request_body, $integration_type ) {
    	$request_body['status_if_new'] = 'subscribed';
    	$request_body['status']        = 'subscribed';
    	return $request_body;
    • This reply was modified 2 years, 4 months ago by arabtornado.
    Plugin Contributor yikesitskevin


    Perfect. I’ll get back to you later today about the second half of your original question.

    Thread Starter arabtornado


    Thanks so much kevin

    Plugin Contributor yikesitskevin


    So there’s no good way to not update the field. However, we could add the value of the newsletter checkbox only if it’s checked. That would look something like this…

    This snippet relies on a CF7 field called your-newsletter and a MailChimp MERGE field called mergetag-newsletter. Obviously you can change these names to match the names of your fields.

    Additionally, this is assuming that the CF7 field returns 1 if it’s checked. I’m assuming this is correct but I can’t guarantee it. You’ll need to find that out yourself 🙂

    * Add data from CF7 form to MailChimp subscription
    * @param array | $merge_variables | An array of variables we're sending to MailChimp
    * @param array | $cf7_variables   | An array of variables we received from the CF7 form submission
    * @return array| $merge_variables | An array of variables we're sending to MailChimp, hopefully with CF7 variables added
    function additional_contact_form_7_data( $merge_variables, $cf7_variables ) {
    	// Check our $cf7_variables array for 'your-newsletter'
    	if ( isset( $cf7_variables['your-newsletter'] ) && (string) $cf7_variables['your-newsletter'] === '1' ) {
    		// Filter var and add it to our MailChimp merge variables array
    		$merge_variables['mergetag-newsletter'] = filter_var( $cf7_variables['your-newsletter'], FILTER_SANITIZE_STRING );
    	return $merge_variables;
    add_filter( 'yikes-mailchimp-contact-form-7', 'additional_contact_form_7_data', 10, 2 );


    Thread Starter arabtornado


    Thanks so much Kevin, That worked perfectly 🙂

    Plugin Contributor yikesitskevin


    Nice! You implemented that quickly!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Contact 7 Integration not working’ is closed to new replies.