File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 22 <form >
33 <vue-form-generator :schema =" section1" :model =" model" :options =" formOptions" ></vue-form-generator>
44 <vue-form-generator :schema="section2" :model="model" :options="formOptions"></vue-form-generator>
5+ <pre>{{ model }}</pre>
56 </form>
67</template >
78
@@ -14,6 +15,8 @@ export default {
1415 model: {
1516 name: ' Brian Blessed' ,
1617 email: " brian@hawkman.mongo" ,
18+ more: " More" ,
19+ things: " Things" ,
1720 pref_1: ' blah'
1821 },
1922
@@ -50,8 +53,15 @@ export default {
5053 model: " things"
5154 }
5255 ]
53- }]
54-
56+ }],
57+ fields: [
58+ {
59+ type: " input" ,
60+ inputType: " text" ,
61+ label: " Pref 1 (without group)" ,
62+ model: " pref_1"
63+ }
64+ ]
5565 },
5666
5767 section2: {
Original file line number Diff line number Diff line change @@ -151,8 +151,10 @@ div.vue-form-generator(v-if='schema != null')
151151
152152 beforeMount () {
153153 // Add idPrefix to fields if fieldIdPrefix is set
154- for (let field of this .schema .fields ) {
155- field .idPrefix = this .options .fieldIdPrefix || " " ;
154+ if (this .schema .fields ) {
155+ for (let field of this .schema .fields ) {
156+ field .idPrefix = this .options .fieldIdPrefix || " " ;
157+ }
156158 }
157159 },
158160
You can’t perform that action at this time.
0 commit comments