• Resolved philcaisley

    (@philcaisley)


    Hi,

    I’ve just installed you plug-in and have selected the ‘Hide form after a successful sign-up?’ function and set this to ‘Yes’. I’ve signed up with a few different emails, and have acknowledged the resultant email I receive, but on each occasions, the form still remains on the page after sign-up.

    Is it possible that there’s a bug that hasn’t yet been caught for this version of WP?

    Many thanks for your help
    Phil

    https://www.ads-software.com/plugins/mailchimp-for-wp/

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

    (@dvankooten)

    Hi Phil,

    There shouldn’t be a bug with the latest version of WordPress, but it could very well be something in your theme that prevents this feature from working correctly.

    Could you share your site URL with us so that we can take a detailed look?

    Thanks in advance!

    Thread Starter philcaisley

    (@philcaisley)

    Hi Danny,

    Many thanks for your prompt response.

    My site URL is https://www.portage-consulting.co.uk/

    I’m using the free version of the theme at present, but will shortly be upgrading to the paid version.

    Many thanks for investigating, I appreciate that.

    Regards
    Phil

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Phil,

    I tested the form multiple times from 2 different browsers and in each instance, the form was hidden after I submitted it.

    Please see the screenshot at https://www.dropbox.com/s/sycf1edlg28pl6w/Screenshot%202016-05-29%2003.58.00.png?dl=0

    Thread Starter philcaisley

    (@philcaisley)

    Hi Harish,

    Many thanks for testing and for posting this screenshot.

    The issue I was observing actually came after this point in the process. I was receiving the same confirmation screen as the screengrab you posted. When I then went to the confirmation email to confirmed my email address, and then returned back to the site to continue what I was doing, I was then seeing the original email sign-up form which I expected to then be hidden from further view.

    I hope this makes sense?

    Regards
    Phil

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello Phil,

    That is the normal behaviour of the form. After seeing the success message, if you refresh the page you would be able to see the form again. This is the way our plugin works,

    If you do not want to show the form at all to users after they have subscribed, you would need to add some custom code that saves a cookie and then subsequently checks if the cookie exists.

    Thread Starter philcaisley

    (@philcaisley)

    Hi Harish,

    Thanks again for your prompt support and explanation.

    What had confused me was the wording in the ‘settings’ panel for the plug-in, which stated the following:

    Form behaviour
    Hide form after a successful sign-up? Yes No
    Select “yes” to hide the form fields after a successful sign-up.

    I had misinterpreted what you had intended to mean about ‘hiding the form fields after a successful sign-up’.

    Thanks once again
    Phil

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey Phil,

    Please check https://gist.github.com/dannyvankooten/8267988.

    If you place below code at the end of “functions.php” file in your active theme, it will set up a cookie after someone subscribes to the form. The next time the user visits your page, the script will check if the cookie exists, and if it does, the form would be hidden.

    // add the following lines of code anywhere in your theme its functions.php file.
    /**
     * Set a cookie whenever someone subscribes
     */
    add_action( 'mc4wp_form_subscribed', function() {
       setcookie( 'mc4wp_subscribed', 1, time() + 3600 * 24 * 90, '/' );
    });
    /**
     * Prints CSS that hides the MailChimp for WordPress form if the "subscribed" cookie is set.
     */
    add_action( 'wp_head', function() {
      if( isset( $_COOKIE['mc4wp_subscribed'] ) )  {
        ?>
        <style type="text/css">
          .mc4wp-form, #mc4wp-checkbox, .widget_mc4wp_widget {
            display: none !important;
          }
          </style>
        <?php
      }

    Please note that if the user unsubscribes, they would not be able to see the form again unless they clear all their browser cache.

    Thread Starter philcaisley

    (@philcaisley)

    Thank you

    Hi everyone!
    As Phil, we are experiencing some trouble using your plugin.
    In particular, enabling the “Redirect to URL after successful sign-ups” option on the WordPress CMS, after the successful registration of a new user, the page still remain the same.
    Here you can find the issue form:
    https://moskitodesi.moskitodesign.com/buzz/it/mailchimp-for-wordpress-form-preview/
    And here there is the landing page where the user should be redirected after the registration:
    https://moskitodesi.moskitodesign.com/buzz/it/thank-for-your-subscription/

    P.S.: Note that all the JavaScript related to the form has been disabled.

    Many thanks in advance for your help, looking forward to hearing from you.

    Moskito

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘'Hide form after a successful sign-up' not working’ is closed to new replies.