Restricting Field Access in Formidable Forms Based on User Roles

By: Mohit Manderna | Asked: 09/04/2024
ForumsCategory: How-toRestricting Field Access in Formidable Forms Based on User Roles
Mohit Manderna asked 2 weeks ago

I have a Formidable form with multiple fields, and I want to control access to these fields based on the user role in the back-end. For example, let's say I have two user roles: Manager and Editor, both of whom have access to the WordPress dashboard. When they navigate to the Formidable Forms section in the WP admin panel, the Manager should be able to view and edit all fields in Form 1. However, the Editor should only be able to see and edit specific fields, with the rest of the fields being hidden from them. How can I achieve this?

1 Answers
Rob LeVineRob LeVine answered 2 weeks ago
Have you already explored the visibility field option?
Mohit Manderna replied 2 weeks ago

Yes! The visibility field works only while creating an entry. but i want this functionality in editing the already submitted enteries.

Rob LeVineRob LeVine replied 2 weeks ago

Personally, I'd never let a non-admin into the WP backend, but if you really want to, I guess you could tailor this example to your needs. https://formidableforms.com/knowledgebase/frm_setup_edit_fields_vars/#kb-set-fields-to-read-only-when-editing

Mohit Manderna replied 2 weeks ago

Thank you for your message. But how can I use this to make different fields read-only for the different user roles? For example field 1 is read-only for the Editor but can be edited by the user role of Admin.

Rob LeVineRob LeVine replied 2 weeks ago

You use WP functions to determine the role of the current user. Alternatively you can hire a developer to help you https://formidable-masterminds.com/developers-directory/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right