• Resolved bothsides

    (@bothsides)


    I’m wondering if there is a way to have a new popup show when a form is successfully submitted.
    I’m currently using this plugin with Contact Form 7 and it works great, but I’d like a different popup to appear when the user has successfully submitted the form.

    Thanks for the excellent plugin!

    https://www.ads-software.com/plugins/popup-maker/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @bothsides – You will want to do something along these lines https://docs.wppopupmaker.com/article/46-how-to-close-a-popup-when-form-is-submitted.

    Except instead of just closing the current popup, you need to also open the next.

    jQuery('#popmake-123').popmake('close');
    jQuery('#popmake-124').popmake('open');

    Hope that helps

    Thread Starter bothsides

    (@bothsides)

    Thanks for the response.
    I’ve implemented the scripts and the original form dialog closes now, but the new form doesn’t open.
    This is what I’ve added to my functions.php file:

    function custom_cf7_scripts() { ?>
        <script>
            // Replace form_7 with the # of your form to ensure
            function _cf7_form_115_on_sent_ok_() {
    
                   setTimeout(function () {
            jQuery('#popmake-10').popmake('close');
    		jQuery('#popmake-141').popmake('open');
        }, 1000); 
    
            }
        </script><?php
    }
    add_action('wp_head', 'custom_cf7_scripts', 1000);

    And I’ve added this to my Contact Form Additional Settings:
    on_sent_ok: "_cf7_form_115_on_sent_ok_();"

    Any ideas of what I’m missing?

    Thread Starter bothsides

    (@bothsides)

    I still can’t get this to work.

    Any ideas?

    Plugin Author Daniel Iser

    (@danieliser)

    Try

    on_sent_ok: "_cf7_form_115_on_sent_ok_"

    Thread Starter bothsides

    (@bothsides)

    I put on_sent_ok: "_cf7_form_115_on_sent_ok_" into the additional settings of the Contact Form but it still doesn’t work. Actually, the first popup doesn’t close anymore.

    I’m stumped! I love this plugin and don’t want to have to look for another!

    Should I change something in my functions file also? This is what is currently there:

    function custom_cf7_scripts() { ?>
        <script>
    
            function _cf7_form_115_on_sent_ok_() {
    
                   setTimeout(function () {
           jQuery('#popmake-10').popmake('close');
    		jQuery('#popmake-141').popmake('open');
        }, 1000); 
    
            }
        </script><?php
    }
    add_action('wp_head', 'custom_cf7_scripts', 1000);

    Thread Starter bothsides

    (@bothsides)

    If you want to see the site or get into the backend, I’d be more than happy to provide that info.

    Thanks!

    Thread Starter bothsides

    (@bothsides)

    I got it to work!
    Needed:
    on_sent_ok: "_cf7_form_115_on_sent_ok_();"
    and
    on_sent_ok: "_cf7_form_115_on_sent_ok_;"
    In the Additional Settings area

    Plugin Author Daniel Iser

    (@danieliser)

    @bothsides – Awesome, glad you got it working! Happy I could help you out. Btw, If you have a moment, I would very much appreciate if you could quickly rate the plugin, just to help us spread the word.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Popup after form Submission Success’ is closed to new replies.