• Resolved dreison27

    (@dreison27)


    I think the trigger -> trigger('popmakeSetCookie') is not working since I cannot see the cookie created in developer tools.

    I can create the cookie just fine when I use the on popup close but when using manual javascript it is not working. I followed the guide on integrating it with contact form 7 and I am sure it is correct and the popup closes when the form is submitted but the cookie is not created.

    Can you please help me with this issue.

    Here is the code on functions.php

    /* Custom JS script for Popup maker and CF7 integration */
    function custom_cf7_scripts() { ?>
        <script>
            // Replace form_7 with the # of your form to ensure
            function cf7_1407_on_sent_ok() {
    
        jQuery('#popmake-1420').trigger('popmakeSetCookie');
    	
        setTimeout(function () {
            jQuery('#popmake-1420').popmake('close');
        }, 1000); // 5 seconds
    
            }
        </script><?php
    }
    add_action('wp_head', 'custom_cf7_scripts', 1000);

    and the onsent code on CF7 addtional settings :

    on_sent_ok: "cf7_1407_on_sent_ok();"

    Thanks

Viewing 1 replies (of 1 total)
  • @dreison27

    For trigger('popmakeSetCookie'), try instead trigger('pumSetCookie') and see if that changes anything.

    Also, this function cf7_1407_on_sent_ok() should read function cf7_form_1407_on_sent_ok().

    Same thing on the additional CF7 settings, it should read: on_sent_ok: "cf7_form_1407_on_sent_ok();".

    Make those small changes and let us know if that fixes the issue.

    Thank you for being patient.

Viewing 1 replies (of 1 total)
  • The topic ‘Cookies is not set on form submission. Contact form 7.’ is closed to new replies.