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.

User Levels

  1. I'm trying to have both users with levels of Editor and Administrator edit forms. Currently it's set to only allow users with the level of "administrator". I changed line 31 in gravityforms.php to: define("IS_ADMINISTRATOR", current_user_can("editor")); and it now allows editors to edit the forms but now administrators cannot.

    I'm assuming there is an easy fix for this. Please let me know.

    Thanks,
    Tim

    Posted 15 years ago on Friday September 11, 2009 | Permalink
  2. looks like i found a fix as soon as i posted. Answer is, change line 31 to:

    define("IS_ADMINISTRATOR", current_user_can("level_7"));

    Posted 15 years ago on Friday September 11, 2009 | Permalink
  3. While that is an easy fix, please keep in mind that will get overwritten with updates. The next version will have a filter that you can access to adjust this using code external from the plugin files itself. We will post a "How To" once the next release is out.

    We are also looking into integration options with existing role management plugins.

    Posted 15 years ago on Friday September 11, 2009 | Permalink
  4. The latest version of Gravity forms seems to have broken the hack we came up with to show forms to WP users with Editor privileges and higher.

    Is there something I can modify on this line to make it work again?

    define("IS_ADMIN", strpos($_SERVER['PHP_SELF'], "wp-admin") > 0);

    Posted 15 years ago on Thursday September 17, 2009 | Permalink
  5. You can use the gform_cap_full_access hook to change the way GravityForms handles permissions (Gravity Forms version 1.1 and above). The following code snippet should do the trick for you. Place it in your functions.php file. Good Luck! Let me know if you have any issues

    add_filter("gform_cap_full_access", set_gravityforms_permission);
    function set_gravityforms_permission($permission){
    if(current_user_can("level_7"))
    return "gform_full_access";
    else
    return "";
    }

    Posted 15 years ago on Thursday September 17, 2009 | Permalink
  6. perfect thanks worked first time

    Posted 15 years ago on Thursday September 17, 2009 | Permalink
  7. Great Lee, good to hear!

    Posted 15 years ago on Thursday September 17, 2009 | Permalink
  8. I do not know php that well so I just posted the code as you had it written out into my functions.php file and it did not work, should post something around this code to make it work properly...

    Posted 15 years ago on Wednesday October 14, 2009 | Permalink
  9. @DrumCreative you shouldn't have to use this code anymore. It is already supported natively.

    The latest version of Gravity Forms integrates with Justin Tadlock's Members plugin which we highly recommend. It is a Role Management plugin that is available for free in the WordPress.org Repository.

    You can download it here:

    http://wordpress.org/extend/plugins/members/

    If you install the Members role management plugin you can then manage roles and have full granular control over who can and can't access Gravity Forms.

    See details here:

    http://www.gravityhelp.com/gravity-forms-v1-2-released/

    Look for the section titled "Role Management Integration" for a description and quick screencast video.

    This role management integration requires the latest version of Gravity Forms (v1.2.1) which you can upgrade to via automatic upgrade or download it manually on the Download page.

    Posted 15 years ago on Wednesday October 14, 2009 | Permalink
  10. Thanks Carl! was looking for this exact feature for one of my clients.
    Loving GravityForms!

    Posted 15 years ago on Monday October 19, 2009 | Permalink
  11. I only need to give editors permission to insert forms in posts and pages (don't want them to edit or create new forms, just insert the forms I created as admin). Is installing Justin Tadlock's plugin the only way to go? Thank you for your help!

    Posted 13 years ago on Sunday April 24, 2011 | Permalink
  12. Adding the code from Alex (above) in functions.php gives editors full access to GF. But, is there any way to restore permissions now? (just removing the code from functions.php doesn't do the trick, and "remove_filter" doesn't seem to work either).

    Posted 13 years ago on Sunday April 24, 2011 | Permalink
  13. @dnab If you want to fully manage user roles I would suggest using a plugin to do this rather than custom code. A very streamlined/efficient plugin you can use to implement full role management is the Members plugin from Justin Tadlock. You can find it here:

    http://wordpress.org/extend/plugins/members/

    Posted 13 years ago on Monday April 25, 2011 | Permalink
  14. Unfortunately Justin's plugin doesn't see super_admin roles so we can't limit only to super admin's :(

    Posted 13 years ago on Monday May 2, 2011 | Permalink