๐Ÿ”ฎ Sanity Create is here. Writing is reinvented. Try now, no developer setup

Generating a fresh initialValue in an object for prefilling fields in a pageBuilder document.

1 replies
Last updated: Nov 1, 2023
Hi ๐Ÿ‘‹ Is there a way to generate a fresh
initialValue
in an object being used in a pageBuilder document? I'm trying to prefill a field with a random number using initialValue but the same random number keeps appearing upon adding additional "instances" of this same object
Nov 1, 2023, 7:55 PM
just figured it out. Returning a function instead of a string does the trick. Thanks ๐Ÿ˜„
Nov 1, 2023, 8:02 PM

Sanityโ€“ build remarkable experiences at scale

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

Was this answer helpful?