Close on Submit with embedded CF7 Form
-
I’ve tried to implement both the cf7 code from the knowledge base
(https://wppopupmaker.com/docs/advanced/how-to-close-a-popup-when-form-is-submitted/ )function custom_cf7_scripts() { ?> <script> function _cf7_18535_on_sent_ok_() { popmake-18536.trigger('popmakeSetCookie').popmake('close'); } </script><?php } add_action('wp_head', 'custom_cf7_scripts', 1000);and in the cf7 advanced settings tab I added
on_sent_ok: "__cf7_18535_on_sent_oAnd I also tried wrapping the cf7 submit shortcode with a class=popmake-close.
The first effort, using code in functions.php, isn’t working. The form works and submits correctly but the popup doesn’t close. The second method using a class wrapper closes the popup but the form doesn’t submit.
You can see the popup for the whitepaper request popup at http://www.ahhhalaw.com
Any help you can give on implementing the close on successful submit will be greatly appreciated.
The topic ‘Close on Submit with embedded CF7 Form’ is closed to new replies.