Close Popup and Create Cookie When a Form is Submitted
Note: Popup Maker version 1.9 introduces the Form Submission trigger and cookie. Recommended good practice is to use the new trigger and cookie together when using a Popup Maker form or integration-supported WordPress form plugin inside a popup.
See: Popup Maker Integration with WordPress Form Builder Plugins
See: Trigger: Form Submission
Warning! Code Ahead
Avoid the time and hassle of using code and switch to Ninja Forms, Gravity Forms or Contact Form 7! Popup Maker comes with this functionality built in if you're using the latest versions Ninja Forms, Gravity Forms or Contact Form 7.
Open and close popups, plus create Cookies on form submit with the click of a button by using Popup Maker and Ninja Forms, Gravity Forms or Contact Form 7 together! Plus, these features work with all triggers.
See How Easy It Is
- Close/Open Popup and Create Cookie After Ninja Forms Submission
- Close/Open Popup and Create Cookie After Gravity Forms Submission
- Close/Open Popup and Create Cookie After Contact Form 7 Submission
Traditional Solution with Code
This solution works for Auto Open/Time Delay, Scroll, and Exit Intent Triggers.
Setup Your Cookie
After clicking Add, you will be able to customize every aspect of how your Cookie will behave. For detailed explanations on all of the Cookie Settings and features, check out the Cookie Settings and Features Doc.
Add the following code to your site theme (or child-theme) 'functions.php' file starting with 'add_action()'.