Hide a setting tab [RESOLVED]

I am experimenting a little bit with the new version of gravity forms and I was trying to change the tabs that are being shown above the form editor and above the settings etc.

I managed to add a new tab following the documentation (https://docs.gravityforms.com/gform_field_settings_tabs/) but I couldn’t find a way to remove one. For example remove the “preview button” Anyone has an idea how to do that?

Greatly appreciated.


Hello Johan. That filter is explicitly for registering new tabs. Can you try removing the gravityforms_preview_forms capability for the role where you want to remove the Preview tab?

Hi Chris, I tried that actually but the link remains there, people just receive a message that they cannot access that page. This is why I would like to remove the tab to avoid having links that don’t work. I have the same problem for the create a view links coming from gravity view.

Any help or suggestions is much appreciated!

Kind regards, Johan

Most of the menu items displayed on the form editor toolbar can be filtered using:

With the beta the preview link is not actually part of the menu, it’s a separate link which is only displayed if the user is an admin or they have the gravityforms_edit_forms, gravityforms_create_form, or gravityforms_preview_forms capabilities. The link can be removed using the following:

add_filter( 'gform_preview_form_link', '__return_empty_string' );
1 Like

Thank you very much. This was what I was looking for!

1 Like