Hi, very practical package.
I have checked documentation and live examples but could not find solutions for my questions. Maybe I missed it.
1- Is it possible to have nested form fields. My intention is only for generating wrappers for some form fields in HTML. I need to have the following schema.
schema: {
fields: [{
type: "group",
label: "Group 1",
fields: [
{
type: "input",
inputType: "text",
label: "Name",
model: "name",
placeholder: "Your name",
featured: true,
required: true
},
{
type: "input",
inputType: "password",
label: "Password",
model: "password",
min: 6,
required: true,
hint: "Minimum 6 characters",
validator: VueFormGenerator.validators.string
}
]
},{
type: "group",
label: "Group 2",
fields: [
{
type: "select",
label: "skills",
model: "type",
values: ["Javascript", "VueJS", "CSS3", "HTML5"]
},{
type: "input",
inputType: "email",
label: "E-mail",
model: "email",
placeholder: "User's e-mail address"
},{
type: "checkbox",
label: "Status",
model: "status",
default: true
}
]
}]
}
2- What about conditional form fields? For example if I enable a switch, several other form fields will be visible.
Thanks in advance,
Hello,
currently there is no grouping feature. It is only our TODO list
But you can solve it with two vue-form-generator
Every field have a visible & disabled properties, which can be also a function. Example in dev
Thanks for the fast answer.
I wait but if you have any hint at the moment, please share it.
Thanks
Docs say there is grouping? Are the docs just ahead of time?
Yes, there is a PR about grouping, but not merged yet.
Cool. Any idea when it'll be merged on?
I hope in this week.
Most helpful comment
209 published: https://github.com/icebob/vue-form-generator/releases/tag/v2.0.0-beta7