| CARVIEW |
Select Language
HTTP/2 301
date: Sun, 28 Dec 2025 10:04:21 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_toolbar_menu/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=xqsGEl5E%2FObUgFMY%2F0DdKy%2FtZHm%2B5Tpli4cKJmJDHEXC0tNpV4%2BH0h0Q2FStve8uiBhnbmyEELDVpFVBWrPdWK%2BpFykjwgfbDEch3Z2noE%2Fbcnk8"}]}
cf-ray: 9b503ba26cfbc464-BLR
HTTP/2 200
date: Sun, 28 Dec 2025 10:04:21 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=KrnXYZMr8xuVg5TX2TtfZ9fODGwqI5S7%2FuWSZgU04uCJgZCdAm6WQN8YuoU9nvZddm1MUfmrTeZ8PHAfb8ybTRdmL80gQe3idoR6SZzWRpSNa%2Bkd"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b503ba9b9ebc464-BLR
gform_toolbar_menu - Gravity Forms Documentation
gform_toolbar_menu
Description
Modify the links that are displayed in the Gravity Forms toolbar.
Usage
add_filter( 'gform_toolbar_menu', 'my_custom_function' );
Parameters
- $menu_items array
An array of menu items and their properties.
$form_id integer
The ID of the form for which the toolbar is being displayed.
Examples
This example demonstrates how you can add your own item to the Gravity Forms Toolbar which displays on the Form Editor, Form Settings, and Entries views.
add_filter( 'gform_toolbar_menu', 'my_custom_toolbar', 10, 2 );
function my_custom_toolbar( $menu_items, $form_id ) {
$menu_items['my_custom_link'] = array(
'label' => 'My Custom Link', // the text to display on the menu for this link
'title' => 'My Custom Link', // the text to be displayed in the title attribute for this link
'url' => self_admin_url( 'admin.php?page=my_custom_page&id=' . $form_id ), // the URL this link should point to
'menu_class' => 'gf_form_toolbar_custom_link', // optional, class to apply to menu list item (useful for providing a custom icon)
'link_class' => rgget( 'page' ) == 'my_custom_page' ? 'gf_toolbar_active' : '', // class to apply to link (useful for specifying an active style when this link is the current page)
'capabilities'=> array( 'gravityforms_edit_forms' ), // the capabilities the user should possess in order to access this page
'priority' => 500 // optional, use this to specify the order in which this menu item should appear; if no priority is provided, the menu item will be appended to end
);
return $menu_items;
}
Source Code
This filter is located in GFForms::top_toolbar() in gravityforms.php