Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fcc4988

Browse files
committed
[FEATURE] Groups
* Add support for schema.groups, schema.groups legend & field id prefixes * Add support for grouping fields. You still can to put fields as always in combination with groups. * Add support for an optional legend for each group/fieldset. Expects the schema to look something like this: ``` section1: { groups:[{ legend: "Contact Details", fields: [ { type: "input", inputType: "text", label: "Name", model: "name" }, { type: "input", inputType: "email", label: "Email", model: "email" } ] },{ legend: "Other Details", fields: [ { type: "input", inputType: "text", label: "More", model: "more" }, { type: "input", inputType: "text", label: "Things", model: "things" } ] }] }, ``` * Add support for field id prefixes, at the form level. So you can add a `fieldIdPrefix: 'prefix_here_'` to your `formOptions` and this will be prepended to _all_ field id's. Based on phemisystems/vue-form-generator@a6165c8 @dflock @phemisystems
1 parent 189b4b4 commit fcc4988

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

‎multipleforms/app.vue

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,40 @@ export default {
1818
},
1919
2020
section1: {
21-
legend: "Contact Details",
22-
fields: [
23-
{
24-
type: "input",
25-
inputType: "text",
26-
label: "Name",
27-
model: "name"
28-
},
29-
{
30-
type: "input",
31-
inputType: "email",
32-
label: "Email",
33-
model: "email"
34-
}
35-
]
21+
groups:[{
22+
legend: "Contact Details",
23+
fields: [
24+
{
25+
type: "input",
26+
inputType: "text",
27+
label: "Name",
28+
model: "name"
29+
},
30+
{
31+
type: "input",
32+
inputType: "email",
33+
label: "Email",
34+
model: "email"
35+
}
36+
]
37+
},{
38+
legend: "Other Details",
39+
fields: [
40+
{
41+
type: "input",
42+
inputType: "text",
43+
label: "More",
44+
model: "more"
45+
},
46+
{
47+
type: "input",
48+
inputType: "text",
49+
label: "Things",
50+
model: "things"
51+
}
52+
]
53+
}]
54+
3655
},
3756
3857
section2: {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /