File tree Expand file tree Collapse file tree 1 file changed +50
-13
lines changed Expand file tree Collapse file tree 1 file changed +50
-13
lines changed Original file line number Diff line number Diff line change @@ -29,21 +29,44 @@ export default {
29
29
more: " More" ,
30
30
things: " Things"
31
31
},
32
- single: " blah"
32
+ single: " blah" ,
33
+ subname: " "
33
34
},
34
35
35
36
schema: {
36
- groups : [
37
+ fields : [
37
38
{
39
+ type: " group" ,
38
40
legend: " Contact Details" ,
41
+ tag: " div" ,
39
42
fields: [
40
43
{
41
44
type: " input" ,
42
45
model: " name" ,
43
46
label: " Name" ,
44
47
fieldOptions: {
45
48
inputType: " text"
46
- }
49
+ },
50
+ required: true ,
51
+ validator: [" required" ]
52
+ },
53
+ {
54
+ type: " group" ,
55
+ legend: " Subgroup" ,
56
+ styleClasses: " subgroup" ,
57
+ tag: " fieldset" ,
58
+ fields: [
59
+ {
60
+ type: " input" ,
61
+ model: " subname" ,
62
+ label: " Name" ,
63
+ fieldOptions: {
64
+ inputType: " text"
65
+ },
66
+ required: true ,
67
+ validator: [" required" ]
68
+ }
69
+ ]
47
70
},
48
71
{
49
72
type: " input" ,
@@ -56,6 +79,17 @@ export default {
56
79
]
57
80
},
58
81
{
82
+ type: " input" ,
83
+ model: " single" ,
84
+ label: " Single field (without group)" ,
85
+ fieldOptions: {
86
+ inputType: " text"
87
+ },
88
+ required: true ,
89
+ validator: [" string" ]
90
+ },
91
+ {
92
+ type: " group" ,
59
93
legend: " Other Details" ,
60
94
fields: [
61
95
{
@@ -76,20 +110,12 @@ export default {
76
110
}
77
111
]
78
112
}
79
- ],
80
- fields: [
81
- {
82
- type: " input" ,
83
- model: " single" ,
84
- label: " Single field (without group)" ,
85
- fieldOptions: {
86
- inputType: " text"
87
- }
88
- }
89
113
]
90
114
},
91
115
92
116
formOptions: {
117
+ validateAfterLoad: true ,
118
+ validateAfterChanged: true ,
93
119
fieldIdPrefix: " frm1-"
94
120
}
95
121
};
@@ -103,4 +129,15 @@ export default {
103
129
104
130
<style lang="scss">
105
131
@import " ../../style.scss" ;
132
+ .field-group {
133
+ border : 2px solid #bbb ;
134
+ padding : 8px ;
135
+ border-radius : 4px ;
136
+ }
137
+ .subgroup {
138
+ border-color : goldenrod ;
139
+ legend {
140
+ color : #00268d ;
141
+ }
142
+ }
106
143
</style >
You can’t perform that action at this time.
0 commit comments