Description
Use this filter to disable the automatic sanitization of form settings, including sanitization of form data such as titles, descriptions, CSS classes, and other form properties. This should only be used when you must preserve specific formatting or content that would otherwise be sanitized.
Usage
add_filter( 'gform_disable_form_settings_sanitization', 'your_function_name', 10, 1 );
Parameters
Parameter | Type | Description |
---|---|---|
$disabled | bool | Whether form settings sanitization should be disabled. Default is false. |
Examples
Disable form settings sanitization.
add_filter( 'gform_disable_form_settings_sanitization', '__return_true' );
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 1.9.6.10.
Source Code
This filter is located in GFFormsModel::sanitize_settings() in forms_model.php.