gform_field_settings_tab_content

Description

The gform_field_settings_tab_content action hook is used to echo the content for a custom field settings tab in the form editor. Use the gform_field_settings_tabs filter to register the tab.

Usage

The base action which would run for all forms and all custom tabs would be used like so:

add_action( 'gform_field_settings_tab_content', 'your_function_name', 10, 2 );

You can target a specific tab by adding the tab id after the hook name.

add_action( 'gform_field_settings_tab_content_thetabid', 'your_function_name', 10, 2 );

You can target a specific tab and form by adding the id’s after the hook name.

add_action( 'gform_field_settings_tab_content_thetabid_6', 'your_function_name', 10, 2 );

Parameters

  • $form Form Object

    The form currently being edited.

  • $tab_id string

    The unique ID of the tab being displayed.

Examples

1. Add content to your custom tab

add_action( 'gform_field_settings_tab_content_my_custom_tab_1', function ( $form, $tab_id ) {
	echo '<li>the content of my custom tab.</li>';
}, 10, 2 );

Placement

This code should be placed in the functions.php file of your active theme or a custom functions plugin.

Since

This action hook was added in Gravity Forms v2.5.

Source Code

This action hook is located in GFFormDetail::forms_page() in form_detail.php