PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Opening up roles to Gravity Forms - the function way!

  1. I have read that if you use a role manager type plugin (IE Justins) you can open up lower level user access to gravity forms - I was wondering if you could let me know what the capabilities are that are required.

    I don't like to run too many plugins - and it seems overkill to install this just to open up a capability - I am used to doing stuff like this for minor tasks in a little custom plugin:

    $edit_contributor = get_role('editor');
    $edit_contributor->add_cap('switch_themes');

    If you can let me know what the capabilities are, I can deploy this nice and easy! This info may be useful for other developers too!!

    PS - keep up the good work, this plugin ROCKS and I have been recommending it to everyone! I can't wait to see what you guys roll out in the future.

    Posted 14 years ago on Friday March 12, 2010 | Permalink
  2. Here are the capabilities that Gravity Forms uses:

    Gravity Forms Related Capabilities

    gravityforms_create_form
    gravityforms_delete_entries
    gravityforms_delete_forms
    gravityforms_edit_entries
    gravityforms_edit_entry_notes
    gravityforms_edit_forms
    gravityforms_edit_settings
    gravityforms_export_entries
    gravityforms_uninstall
    gravityforms_view_entries
    gravityforms_view_entry_notes
    gravityforms_view_settings

    Add-On Related Capabilities

    gravityforms_campaignmonitor
    gravityforms_campaignmonitor_uninstall

    gravityforms_freshbooks
    gravityforms_freshbooks_uninstall

    gravityforms_mailchimp
    gravityforms_mailchimp_uninstall

    Posted 14 years ago on Friday March 12, 2010 | Permalink
  3. That's perfect Carl, it's a loose end on the project I'm working on and it's a go-live weekend so you have just saved me a fair bit of time!

    Posted 14 years ago on Friday March 12, 2010 | Permalink
  4. No problem, we offer a bunch of capabilities so hopefully you get it working on your end.

    Posted 14 years ago on Friday March 12, 2010 | Permalink
  5. gdeyoung1822
    Member

    Jonnya, Did you build a separate plugin to manage the role capabilities or did you add the code example (or other code) with the appropriate capability to a specific file within the Gravity Forms files? Also can you provide me the syntax or instruction to use for adding multiple capabilities to a role? Thanks a bunch.

    PS. Carl, GREAT Plugin! I learned about it at CMS Chicago in May from Shayne, I bought the Developers License and have used it several times now. My customers love it!

    Posted 13 years ago on Wednesday June 16, 2010 | Permalink
  6. thebootroom
    Member

    Thanks firstly to Jonnya for giving me the motivation to use capabilities to solve a similar problem for one of my clients and thanks also to Carl for posting such a clear comprehensive list of the capabilities required.

    Cheers.

    Posted 13 years ago on Thursday June 17, 2010 | Permalink
  7. Hi Guys,

    Great post, very clear!

    I have added:

    //Gravity Forms User Roles Access
    $edit_contributor = get_role('staff');
    $edit_contributor->add_cap('gravityforms_edit_entries');
    $edit_contributor->add_cap('gravityforms_edit_entry_notes');
    $edit_contributor->add_cap('gravityforms_export_entries');
    $edit_contributor->add_cap('gravityforms_view_entries');
    $edit_contributor->add_cap('gravityforms_view_entry_notes');

    To my functions file, but Help and Campaign Monitor are still showing, is there any way to hide these aswell?

    Thanks for all of the help

    Posted 13 years ago on Tuesday August 10, 2010 | Permalink
  8. If they are showing then it appears the contributor role already has those capabilities some how. You would need to remove them.

    Posted 13 years ago on Tuesday August 10, 2010 | Permalink