Request for "generate" button for string type and suggestion to use slug schema type instead.

2 replies
Last updated: Jul 29, 2020
Is it possible to add a “generate” button for a string type? My use case is I created a “shortID” field that I use for url-friendly unique id. I already have it as initial value but would like to generate as well
Jul 29, 2020, 1:42 AM
Could you use the slug schema type and name different to the page slug? At least as a stopgap workaround.
Jul 29, 2020, 2:04 AM
Thanks! Now that I think about, slug would actually be much better
Jul 29, 2020, 2:06 AM

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?