Close/Open Popup and Create Cookie After Ninja Forms Submission
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
Popup Maker integrates directly with the Ninja Forms (NF) plugin to allow plugin users to set a browser cookie on form submit. The cookie prevents a popup that contains the form from displaying again after the form is successfully submitted.
Follow these steps to set a Popup Maker 'Ninja Forms Success' cookie:
- Within the Popup Editor, scroll to the Popup Settings box;
- Select the 'Triggers' option tab;
- Select the 'Triggers & Cookies' option category;
- Select the button labeled 'Add New Cookie'.
The option settings box labeled 'When should your cookie be created?' will open. Select the drop-down menu options to view the cookie options. Select the 'Ninja Form Success' option and then select the 'Add' button to set the option. Follow the remaining prompts within the option settings box to either add or update the cookie option setting.
Minimum Plugin Requirements to Integrate Popup Maker and Ninja Forms
Popup Maker version 1.4+
Ninja Forms version 3.x+
See the Ninja Forms Success Cookie In Action
The following videos use an older Popup Maker Admin interface ( before version 1.7+). However, the process to set and link a trigger with a cookie remains the same in the current version of the plugin. The example videos in this section demonstrate the link between a trigger and a Ninja Forms Success cookie.
Create Cookie on Form Submit
Create a cookie just like you normally would, except use the "Ninja Forms Success" cookie option as shown in the below video:
Close a Popup on Form Submit
Access the "Close Popup" Action when you build your form inside the Ninja Forms module, as seen in the following video. If you want your users to see your "Success" message to confirm the popup form submission, make sure to set a popup close delay in the Ninja Forms plugin.
Open a Popup on Form Submit
Access the "Open Popup" Action when you build your form inside the Ninja Forms module, as seen in the following video:
Popup Maker Actions Following Form Submit Success
The Ninja Forms plugin allows users to set and display a 'success' or 'confirmation message' after form submit success. The success message is set and managed within the form plugin itself, not Popup Maker.
Popup Maker adds a 'Close Popup' and 'Open Popup' option within the Ninja Forms 'Email & Actions' option category. These options allows plugin users 2 ways to display a confirmation message after form submit success. See the related article link below for details.
Related article: How To Set Form Plugin Actions Following Form Submit Success