Gravity Forms is an excellent WordPress plugin, which allows flexible and easy control and creation of pretty much any kind of form in your website. Behind the scenes it has a very flexible integration with the WordPress system of roles and capabilities, which governs who can do what in your admin area. The code below can be cut and pasted into a small plugin or, easier, your functions.php
to allow your editor role users to do everything with your forms, except for updating the plugin, installing add-ons and uninstalling. (You can probably work out which lines to remove to tailor this to your current situation, and if you give too many capabilities you can change add_cap
to remove_cap
to remove the capability from the editor role.) Once the new rules have taken effect you can delete the code and the effects will remain!
$editor = get_role( 'editor' );
$editor->add_cap( 'gravityforms_edit_forms' );
$editor->add_cap( 'gravityforms_delete_forms' );
$editor->add_cap( 'gravityforms_create_form' );
$editor->add_cap( 'gravityforms_view_entries' );
$editor->add_cap( 'gravityforms_edit_entries' );
$editor->add_cap( 'gravityforms_delete_entries' );
$editor->add_cap( 'gravityforms_view_settings' );
$editor->add_cap( 'gravityforms_edit_settings' );
$editor->add_cap( 'gravityforms_export_entries' );
$editor->add_cap( 'gravityforms_view_entry_notes' );
$editor->add_cap( 'gravityforms_edit_entry_notes' );
Leave a Reply to Christopher Cancel reply