Table of Contents
Introduction
Want to control form visibility in Gravity Forms? Easily show or hide forms based on user roles on your WordPress website. With our user roles validation feature in the Gravity Booster plugin, you can do this without writing a single line of code.

Use Cases for Role-Based Form Visibility
There can be plenty of reasons why you want to restrict the form visibility to specific user roles, like:
- Internal workflow forms to be filled out only by administrators or editors
- Customer feedback forms are visible only to logged-in users
- Exclusive offer forms for subscribers
- Sensitive data collection restricted to specific staff roles
By using this feature, you now show the form to the intended audience, and this will prevent any other user role from filling the form even if they have the URL of the page where the form is present.
Steps to Restrict Gravity Forms’ visibility by User Role
Form restriction by user role is part of the free version of the Gravity Booster plugin, which you can download directly from the official WordPress plugin repository. Once you have installed and activated the plugin, follow the steps below.
- Log in to your WordPress backend and then navigate to Forms -> Booster.
- Select the form for which you want visibility restrictions enabled.
- Navigate to the Anti Spam panel and then click on the Restrictions section.
- Here, enable the ‘User Roles Validations’ setting. After enabling, you will get the following options
- Allowed User Roles: Here, you will see a list of all user roles available on your website, including any custom ones you have created using plugins like User Role Editor. Select the ones who should be able to see the form.
- Validation Message: In case someone who doesn’t have the permission to view the form opens it then this validation message will show.

The above steps are fairly simple and give you the ability to fine-tune the visibility of the form according to user roles.
Frequently Asked Questions
Answers to common questions about controlling form visibility by user roles.
Can I show a form to multiple roles at once?
Yes, you can select multiple user roles in the “Allowed Roles” setting. All selected roles will have access to view the form.
What happens if I don’t select any roles?
If no roles are selected, the form will be hidden from all users except administrators. This prevents accidental lockout for site admins.
Will the form be completely hidden or just disabled?
The form will be completely hidden from users who don’t have the right role. Instead, you can optionally show a custom message explaining that access is restricted.
Does this work for users who are not logged in?
Yes. If a user is not logged in, then they won’t be able to see the form.
Can I override the visibility with a shortcode or custom code?
Not at the moment, but we are considering adding developer hooks and shortcode options in a future release for more advanced control.
Is this feature compatible with Gravity Forms’ conditional logic?
Currently, the feature controls the visibility of the entire form. However, field-level visibility based on roles using conditional logic is coming soon.

0 Comments