Viewing 13 replies - 1 through 13 (of 13 total)
  • I would like to have that checkbox-feature too ??

    Plugin Author wpsolutions

    (@wpsolutions)

    Yes I agree that would be a good feature.
    I will add this functionality in the next release due within a few weeks. Stay tuned.

    If you want to update the code so that it requires a checkbox do the following:

    In your form, add a checkbox, something like:

    Subscribe to our Newsletter <input type="checkbox" id="subscribe" name="subscribe" value="yes"/>

    Then in cf7_autoresponder_addon.php edit the following:

    After this line (129):

    $email = $cf7->posted_data["your-email"]; //get the submitted email address from CF7

    add:

    $check_sub = $cf7->posted_data["subscribe"]; //get the checkbox from the form

    Then find the following section:

    $api = new MCAPI($mc_api);
    $yourlists = $api->lists();
    
    foreach ($yourlists['data'] as $list){
      if($list['name'] == $mc_list)
      {
        $retval = $api->listSubscribe( $list['id'], $email, $mergeVars);
        //add subscriber to mailchimp
      }
    }

    Replace it with the following:

    if ($check_sub == “yes”) {
    $api = new MCAPI($mc_api);
    $yourlists = $api->lists();
    
    foreach ($yourlists['data'] as $list){
      if($list['name'] == $mc_list)
      {
        $retval = $api->listSubscribe( $list['id'], $email, $mergeVars);
        //add subscriber to mailchimp
      }
    }
    }
    Plugin Author wpsolutions

    (@wpsolutions)

    You could do what plumwd suggested (thanks for that) or wait till next week when I release the new version of this plugin.

    Great, really thanks ??
    You don’t know how much work you put off my shoulders ;o)

    @wpsolutions I hope I didn’t step on any toes! I just had a client waiting on the solution and couldn’t wait. Looking forward to the update!

    Plugin Author wpsolutions

    (@wpsolutions)

    @plumwd – no not at all and that’s what I would’ve done too ??

    Plugin Author wpsolutions

    (@wpsolutions)

    Hi guys,
    I’ve just released a new version.
    The new version now has the functionality which gives the visitor the option to allow subscription to a mail-list via a checkbox.
    Note, the plugin requires that you set the “name” parameter of the checkbox to “mc-subscribe”.

    Also note that the existing functionality still applies if you don’t have a checkbox – ie, the plugin will automatically try to add your visitors to your list if you have enabled the settings.

    thanks,
    peter

    Thread Starter shawnwyatt

    (@shawnwyatt-1)

    Awesome!!

    Hey wpsolutions,

    i have a few suggestions for your addon ;o)

    1. Would it be possible to customize the name of the fields, maybe on the settingspage, so one can choose “in my form, the first name is called “my_personal_form_1_first_name””. (I’m from germany, i choosed german words ?? )

    2. can you move the settings directly to the cf7 options, so its listed in the admin sidebar under cf7, not general settings (dunno the exact english translation), think this would make more sense ?? Since i dont know how, i just can tell you that “Contact Form to DB Extension” and “Contact-Form-7: 3rd-Party Integration” were already doing that ??

    And a have a question,
    can one use just the checkbox, or does the acceptance box works, too?

    Best regards,
    Marko

    Plugin Author wpsolutions

    (@wpsolutions)

    Hi Marko,
    Thanks for the suggestions and yes I agree that both of the suggestions are good ??
    I always take note of the feedback given and if I feel a suggestion is popular enough I will make every effort to put it in.
    Mostly, it all depends on how much time I have whether I can put all suggestions in.

    Regarding your question about the acceptance box – yes this will work too as long as you name it as per the requirements.

    Fantastic plugin and the mc-subscribe option is a great addition, but it wasn’t working for me because the field was always coming back even when the box was unchecked (which meant it subscribed no matter if the box was checked or not).

    The following tweak resolved it for me:


    $mc_subscribe_value = isset($cf7->posted_data["mc-subscribe"]) ? $cf7->posted_data["mc-subscribe"] : '';

    if (($optin_box_exists) && $mc_subscribe_value == '')

    Plugin Author wpsolutions

    (@wpsolutions)

    Thanks for the heads up Blogrescue.
    I have since fixed the bug and released the fix in version 1.2.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: CF7 AutoResponder Addon] Opt-in Box’ is closed to new replies.