gform_shorcode_preview_disabled

Description

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

Usague

add_filter( 'gform_shorcode_preview_disabled', 'your_function_name' );

Parameters

  • $preview_disabled bool

    Determines if the shorcode preview should be disabled. Defauls to true (disabled).

Example

add_filter( 'gform_shorcode_preview_disabled', 'your_function_name' );

function your_function_name() {
// Enables the shorcode 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 .