👀 See Sanity in action: Watch product demo now →

How to Set the Default Value for the ‘String’ Type ‘Options’ List

6 replies
Last updated: Aug 12, 2021
Would someone happen to know how to set the default value for the ‘string’ type ‘options’ list. I’ve moved the initialValue to multiple places, outside of the options, and into the initialValue object before the fields or after.
Aug 12, 2021, 7:06 PM
put the
invitialValue
outside of
options
and you should be good
Aug 12, 2021, 7:07 PM
user Y
This is what I have also tried, which I believe is what you mean. This was not working for me.
Aug 12, 2021, 7:09 PM
user Y
I have that working now, I refreshed my IDE and re-ran the environment. Not sure why it wasn’t taking. Thank you.
Aug 12, 2021, 7:13 PM
user Y
I have that working now, I refreshed my IDE and re-ran the environment. Not sure why it wasn’t taking. Thank you.
Aug 12, 2021, 7:13 PM
Aha - glad you got it working!
Aug 12, 2021, 7:14 PM
user Y
I have that working now, I refreshed my IDE and re-ran the environment. Not sure why it wasn’t taking. Thank you.
Aug 12, 2021, 7:13 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.