Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Show the user as many array fields as there are minRows on create (v3)

default discord avatar
bcz789last year

I have an array with a field and minRows set to 2. Now, when a new doc is created I want to show the user exactly 2 of these fields empty. It seems like a simple feature, which I would expect a config option for, but it doesn't seem to exist. Am I overlooking a simple solution?



The simple solution is

defaultValue: [{ }, { }]

. See

https://github.com/payloadcms/payload/discussions/3051#discussioncomment-10998220
    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.