• Resolved Alain2006

    (@alain2006)


    Hi,
    I installed the free version of your plugin and gave the Mailchimp API key. The connection being successfull, I went right away to create a form in WP under Mailchimp for WP, but I saw it could not work for many lists since only one tag was generated: [mc4wp_form], so I went to create check boxes to select the different lists.

    Now the problem I have is the check boxes do not show in the Add a New Field drop down in the MailchimpForWP/Forms and the form generared does not contain the checkboxes

    Perhaps I do not understand how to use this plugin with more than one list.

    I tried uninstalling and reinstalling the plugin without success.

    http://wordpress.org/plugins/mailchimp-for-wp/

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

    (@dvankooten)

    Hi Alain,

    You can create multiple forms in the premium version, where each form subscribe to one or multiple lists.

    It is however not possible to have the visitor choose which lists to subscribe to, at least not without adding a few lines of code to your theme its functions.php.

    This is intended use because MailChimp uses interest groupings to segment a list. Users should not be able to choose between lists, by design.

    If you’re interested in how to add checkboxes for each lists and subscribe a visitor based on which checkboxes were checked, let me know so I can help you out. 🙂

    Danny

    I would like to learn this:
    How to add checkboxes for each lists and subscribe a visitor based on which checkboxes were checked. This is the main reason my client purchased the plugin because she thought this was possible. Thank you. 🙂 Tara

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Tara,

    This is not something that is included in the plugin by default as MailChimp doesn’t offer this choice either. I will however integrate it in the plugin in the future.

    For now, we’ll have to do it by adding some code to your theme its functions.php file. This snippet explains it.

    Basically, you will have to get your unique list ID’s (in MailChimp) and add them to your form mark-up as checkboxes.

    <p>
      <h4>Lists:</h4>
    
      <label><input type="checkbox" name="lists[]" value="f123456" /> List 1</label>
      <label><input type="checkbox" name="lists[]" value="f123456" /> List 2</label>
    </p>

    To make the plugin listen to which checkboxes were checked, add the following snippet to your theme its functions.php file.

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

    That should do the trick. If you’re not comfortable with any of this, just shoot me an email as you’re a premium user. The email is listed inside the plugin. 🙂

    Hope that helps!

    Beautiful. I was able to get it setup and working! 🙂 One thing though…on the form, the email box and name box look different. Is there anyway to make them look the same?

    Here is a link to a screenshot of what the form looks like:
    http://chrisblevinswatercolors.com/wp-content/uploads//2014/01/screen_shot_mailchimp_form.png

    Does this code work for the free version or just the premium version?

    Plugin Author Danny van Kooten

    (@dvankooten)

    This code should work for both the free as the premium version. Note that with the latest version of the plugin you can also just add the following to your form.

    <p>
      <h4>Lists:</h4>
    
      <label><input type="checkbox" name="_mc4wp_lists[]" value="f123456" /> List 1</label>
      <label><input type="checkbox" name="_mc4wp_lists[]" value="f123456" /> List 2</label>
    </p>

    The premium version has an option to automatically generate the correct HTML but if you craft your own HTML than you can accomplish the same with the free version.

    Hope that helps!

    AWESOME.
    Worked perfectly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Working with many Mailchimp Mailing Lists’ is closed to new replies.