#Make field readOnly in Admin based on another field vlaue
14 messages · Page 1 of 1 (latest)
Hello @wind oyster, my first guess is https://payloadcms.com/docs/fields/overview
Where there is validation information, and that provides siblingData as a prop
Currently readOnly is a boolean, so it cannot be conditional. This will likely be added as a feature in the near future.
You could use access control on the field, and have the field.access.update return false based on other fields in the doc
Hi, there's been quite some time, has there been something done with conditional readOnly fields?
I have a couple of fields that I want to be visible with content within them, but enable editing only if a checkbox is set and couldn't figure out how to do that with the access control stuff 😦
@sterile spire We could help you figure out the field.access.update portion
Want to show us what you tried?
Definitely need this feature
@wide acorn You can acheive the same behavior using access controls if that is helpful!
using access control I can only make it disappear, update or create but what I need is a specific field to be read only when certain value is match. I don't know may be there is a way but I m completely new in this so still figuring out.
I'm going to start looking into this soon. Did you make any progress? @wide acorn @sterile spire
@marsh turtle nope, I changed my requirements accordingly.
If you set update and create to false it has the same effect as setting it to readOnly