field_readonly_by_role
Field Readonly by Role provides a simple and flexible way to control field editability based on user roles.
Instead of hiding fields or duplicating forms, this module allows administrators to define which roles can edit a field and which roles should see it in read-only mode. This is especially useful in editorial workflows where different users need visibility of data but should not modify it.
The module works with entity forms and preserves the fieldโs visibility while preventing unauthorized changes.
๐น Features
Mark entity fields as editable for some roles and read-only for others
Fields remain visible in forms (not hidden)
Works with entity edit forms
No core patches required
Lightweight and focused on access control at field level
๐น Use cases
This module is useful when:
Editors should see administrative fields but not modify them
Moderators can review values without changing them
Different roles participate in the same form with different permissions
You want to avoid creating multiple form displays or duplicating content types
Typical examples include:
Editorial review workflows
Content approval processes
Shared content management between admins and editors
๐น Post-installation
After installing the module:
Go to the field configuration of an entity (Manage fields)
Enable Field Readonly by Role settings for the field
Select which roles can edit the field
All other roles will see the field as read-only in entity forms
No new content types or text formats are added.
The module integrates directly into existing field configuration.
๐น Additional requirements
Drupal core only
No external libraries required
๐น Recommended modules
No additional modules are required.
This module is designed to work independently with Drupal core.
๐น Similar projects
Other modules often:
Hide fields entirely
Require complex workflow setups
Modify permissions at a broader level
Field Readonly by Role focuses specifically on keeping fields visible while restricting editing, providing a simpler and more predictable solution.
๐น Supporting this module
At this time, there are no funding or donation links.
Bug reports, feature requests, and contributions are welcome via the issue queue.
๐น Community documentation
Documentation and usage examples will be added over time.
Community feedback and contributions are encouraged.
๐น Additional notes
This module is intended for site builders and developers who need fine-grained control over field editability without altering form structure or user experience.