gform_shortcode_preview_disabled

Description

This filter is used to enable/disable the shortcode preview within the Add Form button.

Usage

add_filter( 'gform_shortcode_preview_disabled', 'your_function_name' );

Parameters

  • $preview_disabled bool

    Determines if the shortcode preview should be disabled. Defaults to true (disabled).

Example

add_filter( 'gform_shortcode_preview_disabled', 'your_function_name' );

function your_function_name() {
// Enables the shortcode preview
return false;
}

Placement

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

Source Code

This filter is located in gravityforms.php.