Cookies is not set on form submission. Contact form 7.
-
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)
Viewing 1 replies (of 1 total)
- The topic ‘Cookies is not set on form submission. Contact form 7.’ is closed to new replies.