Join Our Newsletter Confirmation Popup Test

NOTE: The Gravity Forms confirmation override hook stopped working after upgrading to Version 2.5.7 on 8 July 2021. So, this demo is now using a jQuery solution in the footer.

Run the demo

  1. Click the JOIN OUR NEWSLETTER button to launch the popup.
  2. Fill out the Gravity Forms form.
  3. Click SUBMIT.

When you submit the form, the default Gravity Forms confirmation (text) is suppressed and a custom Popup Maker popup displays instead.

The code below watches for the confirmation message.

When it notices the confirmation message about to appear, it prevents the original popup from reopening (to display the GF confirmation) and opens the Popup Maker confirmation popup instead.

jQuery(document).ready(function ($) {

	$("#pum-1286").on("pumBeforeOpen", function () {
		const $gfConfirmation = $("#gform_confirmation_message_2");
    	if ($gfConfirmation.length) {
			console.log(`%c[PUM] Confirmation loaded for Gravity Forms form #2.`, 'color:orangered;font-size:16px'); 
			PUM.preventOpen(1286);; // Custom thank you popup. 
	}); // Listener

}); // jQuery
Categorized as Popup, Test

By mark

photographer ∙ writer ∙ web developer ∙ bali indonesia

Leave a comment