Modular Forms provides the ability to specify initial form field values via the FormOptions object: initialValues.
I need the ability to set the initial state of a specific field as an error.
Imagine a scenario where I redirect to a form that verifies uniqueness on the server, and I need to render the form with one field marked as not unique.
What is the right way to achieve this:
Should Modular Forms support FormOptions.initialErrors?
Should users use setError and setResponse? Would be nice to see an example code snippet in the docs (do I need to use batch() etc)
Modular Forms provides the ability to specify initial form field values via the FormOptions object:
initialValues
.I need the ability to set the initial state of a specific field as an error.
Imagine a scenario where I redirect to a form that verifies uniqueness on the server, and I need to render the form with one field marked as not unique.
What is the right way to achieve this:
FormOptions.initialErrors
?