How to Make a Field Read-Only Once a Value Has Been Set

2 replies
Last updated: Mar 4, 2021
Morning everyone! I was wondering... Is there a way to make a field read-only once a value has been set? For example, I have a slug field that is being used to identify certain types of content that I need to allow content editors to set initially when creating a record, but that I don't want to be changed once a record has been created. Is that possible in Studio?
Not yet unfortunately, but the use case makes sense. We've noted it as a feature request, thanks πŸ™‚
Thanks
user M
!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?