gform_get_form_save_email_confirmation_filter

Description

This filter allows the confirmation message on the success message displayed after you enter your email address on a form using the Save and Continue feature to be programmatically changed before it is rendered to the page.

Usage

Applies to all forms:

add_filter( 'gform_get_form_save_email_confirmation_filter', 'your_function_name', 10, 2 );

To target a specific form, append the form ID to the hook name. To target form ID 13 only:

add_filter( 'gform_get_form_save_email_confirmation_filter_13', 'your_function_name', 10, 2 );

Parameters

  • $save_email_confirmation string
    The save email confirmation text.
  • $form Form Object
    The form currently being processed.

Examples

add_filter( 'gform_get_form_save_email_confirmation_filter', 'add_note_to_save_email_confirmation', 10, 2 );
function add_note_to_save_email_confirmation( $save_email_confirmation, $form ) {
	GFCommon::log_debug( __METHOD__ . '(): Running...' );
	$save_email_confirmation .= "Please call us at 888-555-1212 if you need help.";
	return $save_email_confirmation;
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Since

This filter was added in Gravity Forms v2.7

Source Code

This filter is located in the GFFormDisplay::handle_save_email_confirmation() in form_display.php