• Resolved saska0802

    (@saska0802)


    Hello,

    I have user with role Editor, and I added capability to export gravity forms, but I don’t have option to export to excel from your plugin. Is there any way to achieve this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Saska,

    How did you add the capability to the editor role? When you add the following to your functions.php the editor can access all of gravity forms including the excel-results page:

    $role = get_role('editor');
    $role->add_cap('gform_full_access');
    Thread Starter saska0802

    (@saska0802)

    Thank you! It works! I was trying to add just capability for ‘gravityforms_export_entries’.

    Great! If you want to limit the access to certain parts of GF, you can do something like this:

    
    $role = get_role('editor');
    $role->add_cap('gform_full_access');
    
    add_action('admin_menu', function () {
        $user = new WP_User(get_current_user_id());
        if (!empty($user->roles) && is_array($user->roles) && in_array("editor", $user->roles)) {
            remove_submenu_page( 'gf_edit_forms', 'gf_new_form' ); 
            remove_submenu_page( 'gf_edit_forms', 'gf_settings' ); 
            remove_submenu_page( 'gf_edit_forms', 'gf_export' ); //native csv import/export
            remove_submenu_page( 'gf_edit_forms', 'gf_help' ); 
            remove_submenu_page( 'gf_edit_forms', 'gf_system_status' );   
        }
    },9999);
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow Editor to export entries’ is closed to new replies.