Vue Formulate FormulateForm issue

207 views Asked by At

Trying to use Vue Formulate to generate dynamic forms based on a schema. The problem I'm having is if I have two elements that are the same in my schema I get a duplicate keys detected error. Is it possible to specify the index as the key? Or is there a way I can incorporate IDs into my schema to avoid this error? thanks in advance.

1

There are 1 answers

0
adam On

Unclear whether this is your issue, but I've found that non-form elements in the schema, e.g. a <component>, h3, or <div> often produce this error, but can have a "key" attribute added in the schema to fix it e.g.:

[
  {
    "component": "h3",
    "key": "h3",
    "children": "Sample Text",
    "class": "m-image-request-form__h3"
  },
 ]