You are viewing an old revision of this post, from May 1, 2015 @ 01:15:21. See below for differences between this version and the current revision.

Gravity forms access for clients

Taken from Gist: https://gist.github.com/mannieschumpert/7188426 When using Gravity Forms on a client project, you might want the client to be able to view and manipulate form entries, without giving them administrator access. The user_has_cap filter allows us to add capabilities without changing the role in the database. This gist allows users with the editor role to view and manipulate form entries. [php]add_filter('user_has_cap', function( $caps ){ if (! empty( $caps['edit_pages'] ) ) { // user has edit capabilities $caps['gravityforms_delete_entries'] = true; $caps['gravityforms_edit_entries'] = true; $caps['gravityforms_edit_entry_notes'] = true; $caps['gravityforms_view_entries'] = true; $caps['gravityforms_view_entry_notes'] = true; } return $caps; });[/php]

Revisions

  • May 1, 2015 @ 01:15:21 [Current Revision] by PeterLugg
  • May 1, 2015 @ 01:15:21 by PeterLugg

Revision Differences

There are no differences between the May 1, 2015 @ 01:15:21 revision and the current revision. (Maybe only post meta information was changed.)

Tags:

No comments yet.

Leave a Reply