[Forminator Pro] Add custom capability so editors can see form submissions

Currently a user requires the manage_options capability to see Forminator in the dashboard.

This capability effectively gives admin priviledges to the user so is not suitable for the Editor role.

Really need a custom capability, or more refinement available, so that editors can view/manage submissions (but not create forms or alter options etc).

Processing form submissions should not be an admin only task.

  • Adam Czajczyk
    • Support Gorilla

    Hi John

    I hope you're well today and thank you for suggesting a feature!

    Currently, there's no such setting but there is a filter built-in already:

    forminator_admin_cap

    so with a small additional code you can affect "role capabilities" if it comes to allowing/restricting access to Forminator. However, the "downside" is that it doesn't affect only the submissions but also all other Forminator admin pages. If that's fine for you, let me know and I'll help you with a small code snippet to use it.

    I have also suggested to our developers adding some sort of "capability editing" for Forminator so they would put it under consideration :slight_smile:

    Best regards,
    Adam

  • John
    • Design Lord, Child of Thor

    Hi Adam,

    Using forminator_admin_cap would do me for now. For this particular site the users are responsible enough to use forminator, just not for the full manage_options capability!

    Finer grained capability control would be great though.

    If you could show me the required code that would be great.

    Thanks,
    John

  • Adam Czajczyk
    • Support Gorilla

    Hi John,

    In that case this code should do the trick for you:

    function forminator_custom_cap_return( $cap ) {
    
    	$cap = 'delete_others_posts'; // set a unique custom capability here
    
    	return $cap;
    }
    add_filter( 'forminator_admin_cap', 'forminator_custom_cap_return', 10, 1);

    You can add it to the "function.php" file of your theme or as an MU plugin.

    The basic idea is that the code must return some capability that's "unique" to a given role. In this case the "delete_others_posts" capability is a capability that editors and all the roles above have but no role below editor have it. As a result Editors and Administrators would have full access to Forminator but not Subscribers, Contributors and Authors.

    You can use a different capability too, if you want. You'll find a full list of default WP capabilities for default user roles here:

    https://codex.wordpress.org/Roles_and_Capabilities

    Best regards,
    Adam

  • CWN Design
    • New Recruit

    We are current gravity form users for our clients and we are interested in Forminator pro as a possible replacement when it comes up for renewal particular because of Forminators very good GDPR features.

    However, it is very common for our clients to require a variety of access levels to the form plugin, some editors need to edit the form builder but not access to settings or recipients and some lower level users just need to see submissions.

    A way to manage these permissions is crucial to be a viable competitor to other premium form modules. The ability to control via code in fucntions.php is a good first step but I would be keen to see a proper management system implemented (maybe via wpmudev dashboard) or even to expose the custom caps for other popular plugins such as 'User Role Editor' or 'Members' to be able to modify them without the need to edit php files.

    TLDR:
    1. Access to submissions only
    2. Access to submissions and form editing
    3. Expose the custom caps to other plugins or via WPMUDev dashboard

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.