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?