Page 1 of 1

Make a field readonly for certain users but non with js

Posted: 2020-09-30 21:45
by fgazza
Hello everybody. I would need to render a readonly field for some users but for security reasons I would like to avoid using javascript as experts may get around the "readonl'y" setting.

Can someone help me?

Thank you!

Re: Make a field readonly for certain users but non with js

Posted: 2020-10-02 18:50
by pbottcher
Hi,

you can still make the field readonly via js, but you should check (anyways) the data on the before_insert/update hook to prevent unwanted manipulation.