gform_plugin_settings_fields

Description

The gform_plugin_settings_fields filter is used to customize the available settings on the Forms > Settings page.

Usage

The filter which runs for all would be used like so:

add_filter( 'gform_plugin_settings_fields', 'your_function_name' );

Parameters

  • $fields array
    The plugin settings fields. See the Settings API for details about how the fields are defined.
$fields = array(
	'license_key'         => array(),
	'license_key_details' => array(),
	'css'                 => array(),
	'currency'            => array(),
	'logging'             => array(),
	'toolbar'             => array(),
	'background_updates'  => array(),
	'no_conflict_mode'    => array(),
	'akismet'             => array(),
	'html5'               => array(),
);

Examples

Remove license details

This example would remove the “Your License Details” panel from the Forms > Settings page.

add_filter( 'gform_plugin_settings_fields', function ( $fields ) {
    unset( $fields['license_key_details'] );
 
    return $fields;
});

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 v2.5.16.4.

Source Code

This filter is located in GFSettings::plugin_settings_fields() in settings.php.