bookmark_bordergform_sanitize_confirmation_message

Description

Use this filter to santitize the complete confirmation message just before outputting to the page. All scripts will be removed.

By the time the confirmation is displayed all the field values have been sanitized. However, there may be situations which require and additional level of sanitization. For example, this filter is useful if you’re using merge tags as values for HTML attributes.

Usage

add_filter( 'gform_sanitize_confirmation_message', 'your_function_name' );

Parameters

  • $sanitize_confirmation_nessage bool

    The confirmation message. Default: false.

Examples

1. Turn on sanitization.

add_filter( 'gform_sanitize_confirmation_message', '__return_true' );

Placement

Your code snippet should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GFCommon::maybe_sanitize_confirmation_message() in common.php.

Since

This filter was added in Gravity Forms 2.0.