diff --git a/dev/multipleforms/app.vue b/dev/multipleforms/app.vue index 62443ca8..c3b567dc 100644 --- a/dev/multipleforms/app.vue +++ b/dev/multipleforms/app.vue @@ -2,6 +2,7 @@
+
{{ model }}
@@ -14,6 +15,8 @@ export default { model: { name: 'Brian Blessed', email: "brian@hawkman.mongo", + more: "More", + things: "Things", pref_1: 'blah' }, @@ -50,8 +53,15 @@ export default { model: "things" } ] - }] - + }], + fields: [ + { + type: "input", + inputType: "text", + label: "Pref 1 (without group)", + model: "pref_1" + } + ] }, section2: { diff --git a/src/formGenerator.vue b/src/formGenerator.vue index fbe425f1..92dae82a 100644 --- a/src/formGenerator.vue +++ b/src/formGenerator.vue @@ -151,8 +151,10 @@ div.vue-form-generator(v-if='schema != null') beforeMount() { // Add idPrefix to fields if fieldIdPrefix is set - for (let field of this.schema.fields) { - field.idPrefix = this.options.fieldIdPrefix || ""; + if (this.schema.fields) { + for (let field of this.schema.fields) { + field.idPrefix = this.options.fieldIdPrefix || ""; + } } },