Using Gravity Forms ‘gform_form_settings_page_$view’ PHP action

The gform_form_settings_page_VIEW action in Gravity Forms allows you to add custom pages (i.e. “views”) to the Form Settings section. This hook is commonly used by Gravity Forms add-ons to integrate their settings pages.

Usage

To use this action, specify the view name after the gform_form_settings_page_ part of the hook name:

add_action('gform_form_settings_page_my_view', 'my_custom_function');

Parameters

There are no parameters for this action.

More information

See Gravity Forms Docs: gform_form_settings_page_VIEW

Examples

Adding a custom settings page

This example adds a custom settings page called “My Custom Settings” to the Form Settings section.

function my_custom_function() {
    // Display your custom settings form here
    echo '<h2>My Custom Settings</h2>';
}

add_action('gform_form_settings_page_my_custom_settings', 'my_custom_function');

Integrating an add-on settings page

This example integrates an add-on’s settings page into the Form Settings section.

function my_addon_settings_function() {
    // Display add-on settings form here
    echo '<h2>My Add-on Settings</h2>';
}

add_action('gform_form_settings_page_my_addon_settings', 'my_addon_settings_function');

Adding a “Help” page to Form Settings

This example adds a “Help” page to the Form Settings section.

function my_help_page_function() {
    // Display help content here
    echo '<h2>Help</h2>';
    echo '<p>This is the help page for your custom form settings.</p>';
}

add_action('gform_form_settings_page_help', 'my_help_page_function');

Displaying a list of registered users

This example adds a settings page that displays a list of registered users on your website.

function my_users_list_function() {
    echo '<h2>Registered Users</h2>';
    $users = get_users();
    echo '<ul>';
    foreach ($users as $user) {
        echo '<li>' . esc_html($user->display_name) . '</li>';
    }
    echo '</ul>';
}

add_action('gform_form_settings_page_users_list', 'my_users_list_function');

Displaying custom form settings

This example adds a settings page that displays custom form settings such as background color and font size.

function my_form_settings_function() {
    // Display custom form settings here
    echo '<h2>Custom Form Settings</h2>';
    echo '<p>Background Color: #F0F0F0</p>';
    echo '<p>Font Size: 16px</p>';
}

add_action('gform_form_settings_page_custom_form_settings', 'my_form_settings_function');