Gravity Forms is by far one of the most popular, user friendly, easy to use form plugins for WordPress. With its many hooks and filters it is easy for developers to make it do pretty much anything.
I was working on a small website development project for the CO2 Coalition. The design called for the notification in a popup instead of the normal page redirect or AJAX notification.
I work with the Genesis Framework by StudioPress. Below you will see the hook
genesis_after_footer. If you aren’t using this framework, make sure you change that to
You will put your custom notification in the Form Settings of the particular form you are making this popup for.
$confirmation on line 10 is reserved for that. Notice that after this variable there is custom content. You can put anything you want there. From lines 15 on, we write some simple jQuery to close the popup and get rid of the overlay that we insert on line 16. Make sure to style that with CSS like so:
You could easily add some animation to this for more elegance. Something like animate.css would be nice. And there you have it.
Bonus: Keep The Form From Disappearing
An optional step is to keep the Gravity Form from disappearing after submission. Shout out to William in the comments for sharing this.