Create Users Who Can Only See Gravity Forms Entries

We have a PublishPress customer who also uses the Gravity Forms plugin. They asked us if it was possible to create a user who can do nothing in WordPress, except for edit form entries in Gravity Forms.

Yes, this is possible, and this tutorial will show you how.

You will need the PublishPress Capabilities plugin installed. We will create new user role called “Gravity Forms” and give them access to Gravity Forms entries. There's a more advanced version of this tutorial available for sites also using WooCommerce.


Step #1. Create a New User Role

First, we're going to copy the Subscriber role because it has very limited permissions. Click here for more on creating new user roles.

  • Go to the Capabilities > Roles your WordPress admin menu.
  • Copy the subscriber role.
  • Enter the role name as “Gravity Forms”.
  • Click “Create Role”.

Step #2. Add the Gravity Forms Permission

We're now going to add a new permission to give this role access to Gravity Forms entries.

  • Find the “Add a New Capability” box in the right side
  • Type “gravityforms_view_entries”.
  • Click “Add to role”.
2 1
  • Scroll down and make sure the box is checked for this permission:
3

Step #3. Create and Test the User

Our final step is to create a user for our new role:

  • Go to the “Users” area in your WordPress admin menu.
  • Create a new user in the “Gravity Forms” role.
Gravity Forms entries
4

Now it's time to test your new user. You can do this with the User Testing feature in PublishPress Capabilities.

When you login as your new user, this image shows what you will see. The user will have very limited access, but they will be able to view Gravity Forms entries:

Gravity Forms dashboard
5 1

Summary

It is possible to expand on this basic set of permissions. We used “gravityforms_view_entries” but the Gravity Forms documentation has more permissions you can give to these users.

For example, you can repeat Step #2 and add “gravityforms_export_entries”. This would allow user to export the entries. Or you could add “gravityforms_edit_entries” and that would allow them to edit the entries.

You might find other PublishPress guides useful including our introduction to bbPress roles and capabilities, plus tutorials on restricting user access in Beaver Builder and Elementor.


PublishPress works great with Gravity Forms

Join PublishPress today and you'll get powerful publishing and permissions plugins to improve your WordPress site.

9 Comments

  1. is it possible to allow a user to edit only one form, i don’t want the user to have access to all forms.
    For example User A can modify only Form 1, and User B can modify only Form 2.
    I’m no php expert, but I thought with the function.php file, I would like to authorize a specific user ($user = ‘Username’;) to access a single form (if ($form[‘id’] == ‘1’).
    function wpc_gravity_forms() {
    $role = get_role(‘editor’);
    $role->add_cap( ‘gravityforms_view_entries’ );
    $role->add_cap( ‘gravityforms_edit_entries’ );
    $role->add_cap( ‘gravityforms_delete_entries’ );
    $role->add_cap( ‘gravityforms_edit_forms’ );
    $role->add_cap( ‘gravityforms_export_entries’ );
    }
    add_action(‘admin_init’,’wpc_gravity_forms’);

    Thanks

  2. Need authors to view only their own entries, any entries that are from a different author must be hidden to Author creating their own entries.

    Does your plugin provide this granular level of access? Please inform me.

    Rob

  3. Please can someone assist me on Gravity Form user role editing.
    I want to arrange my site into 3 groups
    Example: if a user with (subscriber) capability submit a form entry only an (Editor) can see the entry and if an (Editor) submit a form entry only an (Author) will see the form entry and if an (Author) submit a form entry then a (subscriber) will see the form entry

Leave a Reply

Your email address will not be published. Required fields are marked *