Multiple forms
There are a few rules to follow if you want to use multiple forms
On the same page
You should provide custom idPrefix
to avoid id collisions in the DOM
The default value of idPrefix
is root
.
In one component
Because useForm2
internally calls setFormContext
, you can’t create multiple forms in one component with it.
But if you really want to create multiple forms in one component, look at createForm2
.