You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using PayloadCMS I don't know the fields ahead of time, so I generate the default values from the fetched form fields. If I want to seperate out fields or groups of fields I believe the best way is useForm(), but I can't make this work without wrapping a function around it and passing several extra props. It would be so much easier if I could pass "fields" as a prop and use it in the defaultVaules property like this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Using PayloadCMS I don't know the fields ahead of time, so I generate the default values from the fetched form fields. If I want to seperate out fields or groups of fields I believe the best way is useForm(), but I can't make this work without wrapping a function around it and passing several extra props. It would be so much easier if I could pass "fields" as a prop and use it in the defaultVaules property like this.
Beta Was this translation helpful? Give feedback.
All reactions