Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Robin,

    So you want your Contact Form 7 subscribers to be subscribed to a different list than the one you have selected in MailChimp for WP > Checkboxes?

    There are various filters and actions for you to hook into but it would require some coding knowledge. Are you comfortable adding stuff to your theme its functions.php file?

    Thread Starter RobinWebber

    (@robinwebber)

    Hi Danny,

    I think that’s what I try to do indeed. Well, let’s say I have 4 different lists: 1 for English subscribers, 1 for French subscribers, 1 for German subscribers and 1 for Italian subscribers. I also have 4 different contact forms in the 4 different languages, one contact form in English, one in French etc.

    How can I let somebody subscribe to the English MailChimp list from the English contact form, but subscribe to the French MailChimp list from the French contact form?

    I know how to code so I would be able to add stuff to functions.php.

    Thanks again!

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Robin,

    I just answered your email but posting the required steps here as well, in case others stumble across this topic when trying to accomplish the same thing.

    1. Add the list ID to your Contact Form 7 form mark-up (in a hidden input field).

    <input type="hidden" name="_mc4wp_list" value="123abc1234" />

    2. Add the following filter to your theme its functions.php file.

    function myprefix_mc4wp_lists( $lists ) {
    
    	if( isset( $_POST['_mc4wp_list'] ) ) {
    		$lists = array( $_POST['_mc4wp_list'] );
    	}
    
    	return $lists;
    }
    
    add_filter( 'mc4wp_lists', 'myprefix_mc4wp_lists' );

    You can find the List ID in your MailChimp list settings.

    Hope that helps!

    Thread Starter RobinWebber

    (@robinwebber)

    Hi Danny,

    It works! Great ?? Thanks for your help!

    Hi Danny and Robin,

    Here is my form
    https://www.babyphotographymalaysia.com/get-your-free-quote/

    I wish visitors subscribed (Email and Name) to a specific mailchimp list after they have submitted the FORM.

    Should I follow the same procedures as well?

    I’m not a coding guy, but I can try follow the exact solution.

    But I’m not clear about the the procedures no.1 written as “in a hidden input field”

    Thanks ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Subscribe to specific list (Contact Form 7)’ is closed to new replies.