Quantcast
Channel: Styles/Scripts Archives - Gravity Forms Documentation
Viewing all articles
Browse latest Browse all 13

gform_sanitize_confirmation_message

$
0
0

Description

The “gform_sanitize_confirmation_message” filter in Gravity Forms is used to sanitize 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

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.

Since

This filter was added in Gravity Forms 2.0.

Source Code

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

The post gform_sanitize_confirmation_message appeared first on Gravity Forms Documentation.


Viewing all articles
Browse latest Browse all 13

Trending Articles