• Resolved jade.stewart

    (@jadestewartgmailcom)


    I’m using the following script on the page listed bellow to set a cookie and make sure the form doesnt reopen affter the form is submitted however it doesnt seem to be staying closed please come back to me as soon as possible https://jobsinetfs.com/testpage

    function custom_cf7_scripts() { ?>
    <script>
    // Replace form_7 with the # of your form to ensure
    function _cf7_form_3744_on_sent_ok_() {

    /**
    * Here you can simply change 967 to match your Popup ID #.
    * The cookies settings will be determined the settings in the editor.
    * Any trigger ( auto open, exit intent or scroll triggered ) that is
    * Set to manual will have its cookie set using it’s unique settings.
    */
    jQuery(‘#popmake-3952’).trigger(‘popmakeSetCookie’);

    /**
    * Close the popup after a 5 second delay.
    */
    setTimeout(function () {
    jQuery(‘#popmake-3952’).popmake(‘close’);
    }, 5000); // 5 seconds

    }
    </script><?php
    }
    add_action(‘wp_head’, ‘custom_cf7_scripts’, 1000);

Viewing 2 replies - 1 through 2 (of 2 total)
  • @jadestewartgmailcom

    Sorry you are having troubles, I’m sure we can get this resolved.

    First, did you make sure to add extra cookie using the Manual JavaScript Cookie Creation Event? You can find that when you click to add a new cookie in the Popup Editor.

    Second, did you add:

    on_sent_ok: "_cf7_form_3744_on_sent_ok_();"

    to the Advanced Settings Section of CF7?

    Let us know if that helps.

    Closing this ticket due to inactivity. If you’re still having an issue, create a new thread, link this one, and we will continue troubleshooting.

    Please take a moment to rate and review the plugin and or support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘making form auto close after contact form 7 submission’ is closed to new replies.