Using Gravity Forms ‘gform_tooltips’ PHP filter

The gform_tooltips Gravity Forms filter allows you to modify existing tooltips or add new ones in the admin area of Gravity Forms.

Usage

add_filter('gform_tooltips', 'add_tooltips');

Parameters

  • $tooltips (array): An associative array containing the existing tooltips, with the tooltip name as the key and the tooltip text as the value.
    • $tooltips['some_new_feature'] = 'Help text for the new feature goes here';

More information

See Gravity Forms Docs: gform_tooltips

Examples

Add a single tooltip

Add a new tooltip for a custom feature.

add_filter('gform_tooltips', 'add_single_tooltip');

function add_single_tooltip($tooltips) {
    $tooltips['custom_feature'] = 'Help text for the custom feature';
    return $tooltips;
}

Modify an existing tooltip

Update the text for an existing tooltip.

add_filter('gform_tooltips', 'modify_existing_tooltip');

function modify_existing_tooltip($tooltips) {
    $tooltips['form_title'] = 'New help text for the form title';
    return $tooltips;
}

Add multiple tooltips

Add several new tooltips at once.

add_filter('gform_tooltips', 'add_multiple_tooltips');

function add_multiple_tooltips($tooltips) {
    $tooltips['feature_1'] = 'Tooltip for feature 1';
    $tooltips['feature_2'] = 'Tooltip for feature 2';
    $tooltips['feature_3'] = 'Tooltip for feature 3';
    return $tooltips;
}

Remove an existing tooltip

Remove a specific tooltip from the admin area.

add_filter('gform_tooltips', 'remove_existing_tooltip');

function remove_existing_tooltip($tooltips) {
    unset($tooltips['form_description']);
    return $tooltips;
}

Modify and add tooltips

Modify an existing tooltip and add a new one.

add_filter('gform_tooltips', 'modify_and_add_tooltips');

function modify_and_add_tooltips($tooltips) {
    $tooltips['form_title'] = 'Updated help text for the form title';
    $tooltips['custom_feature'] = 'Help text for the custom feature';
    return $tooltips;
}