Problem/Motivation

I'm not sure that I understand quite whether I can use this in my use-case.

I have a field 'question' that should be editable by the certain roles only.

I control this editability using the Field Permissions module.

That all works perfectly, except that because the non-node-author is unable to EDIT, they cannot see the field when editing the node but I want them to be able to 'see' it and so I have turned to this module for help with that.

After installing this module, I do indeed get what I'm after for STUDENT (the non-node-author)...

/read_only_widget

HOWEVER, as a user in the TEACHER role, I DO want to be able to EDIT that field when in the EDIT FORM and the Field Permissions settings are all configured correctly to enable that but the Read Only Widget module still kicks in and get to see the same EDIT form as the student.

It feels like we need to be able to restrict the Read Only Field action to particular role(s) only?

Have I got it all wrong?

CommentFileSizeAuthor
read_only_widget_1.png20.14 KBsirclickalot

Comments

sirclickalot created an issue. See original summary.

niklp’s picture

+1 for an answer to this!

I mean technically, the answer is in (and adjusted version of) the code on the module page - you can do quite a bit with it.

astonvictor’s picture

Version: 8.x-1.6 » 8.x-1.x-dev
Status: Active » Closed (works as designed)

it's not possible to use different field widgets per role.

as an option, you can create different form modes with different field widget configurations and use them for different roles.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.