PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Changing the confirmation message using a hook

  1. Hi, I'd like to use gform_post_submission to alter the confirmation message. But, I am not sure how to do this.

    gform_post_submission seems to work fine. But, I am not able to alter $form["confirmation"]["message"] with it.

    See below for a completely contrived example:

    if( !class_exists( 'WP_Http' ) )
    		include_once( ABSPATH . WPINC. '/class-http.php' );
    
    add_action( 'gform_post_submission_6', 'process_admission_form', 10, 2 );
    
    function process_admission_form($entry, $form){
    
    	$url = 'http://somesite.com/web/?' . http_build_query( $entry );
    	$request = new WP_Http;
    	$result = $request->request( $url );
    
    	$form["confirmation"]["message"] = $result["response"]["code"];
    
    	return $form;
    
    }
    Posted 13 years ago on Wednesday July 20, 2011 | Permalink
  2. There is a hook specifically for customizing the form confirmation. It is gform_confirmation and you can find documentation here:

    http://www.gravityhelp.com/documentation/page/Gform_confirmation

    Posted 13 years ago on Wednesday July 20, 2011 | Permalink
  3. argh. Sorry for missing this. Thanks again for your help.

    Posted 13 years ago on Wednesday July 20, 2011 | Permalink

This topic has been resolved and has been closed to new replies.