Skip to content

Instantly share code, notes, and snippets.

@timersys
Last active July 9, 2018 21:22
Show Gist options
  • Save timersys/fd19386badd90121c5d2562a9a0de189 to your computer and use it in GitHub Desktop.
Save timersys/fd19386badd90121c5d2562a9a0de189 to your computer and use it in GitHub Desktop.
Open popup after WpForms submission - more on https://timersys.com/how-to-display-a-popup-after-user-submits-form/
<?php // don' add this tag
// Open popup after WpForms submission
add_action( 'wpforms_process_complete_534', 'spu_popup_trigger' );
function spu_popup_trigger(){
add_action('wp_footer','spu_open_popup',99);
}
function spu_open_popup(){
echo '<script>setTimeout(function(){SPU.show(529)},1000);</script>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment