• We are available for any Development work:
  • Email us at: programmer_heart@yahoo.com

How to show Success Message as popups in Gravity Form in wordpress

To do this open your functions.php file and paste the following code:

add_filter( 'gform_after_submission', 'sw_gf_thanks_message', 10, 2 );
function sw_gf_thanks_message( $thx_message ) {
add_action( 'wp_footer', 'sw_gf_thx_msg' );
function sw_gf_thx_msg() { ?>
<script type="text/javascript">
alert( "Thank you for your commitment. We will contact you as soon as possible!" );
<?php } ?>

You can change the pop up  message style  by modifying what is inside the sw_gf_thx_msg() function.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *

Press Enter to Search