DescriptionUsageParametersExamples1. Add a new tabPlacementSinceSource Code
Description
The gform_field_settings_tabs filter enables new tabs to be registered for display in the field settings panel in the form editor. Use the gform_field_settings_tab_content action hook to echo the tab content.
Usage
The filter which would run for all forms would be used like so:
1add_filter( 'gform_field_settings_tabs', 'your_function_name', 10, 2 );
You can also target a specific form by adding the form id after the hook name.
1add_filter( 'gform_field_settings_tabs_6', 'your_function_name', 10, 2 );
Parameters
$tabs array
An array of custom field settings tabs.
$form Form Object
The form currently being edited.
Examples
1. Add a new tab
1234567891011121314add_filter( 'gform_field_settings_tabs', function ( $tabs, $form ) { $tabs[] = array( // Define the unique ID for your tab. 'id' => 'my_custom_tab_1', // Define the title to be displayed on the toggle button your tab. 'title' => 'My Custom Tab', // Define an array of classes to be added to the toggle button for your tab. 'toggle_classes' => array( 'my_toggle_class_1', 'my_toggle_class_2' ), // Define an array of classes to be added to the body of your tab. 'body_classes' => array( 'my_body_class_1' ), ); return $tabs;}, 10, 2 );
Placement
This code should be placed in the functions.php file of your active theme or a custom functions plugin.
Since
This filter was added in Gravity Forms v2.5.
Source Code
This filter is located in GFFormDetail::forms_page() in form_detail.php