Apparently there is a bug that doesn't allow the fieldset tag to work with the row class. Is it possible to define a different tag to use instead of the fieldset tag? Here is the schema that i'm using:
schema: {
groups: [{
styleClasses: "row",
fields: [
{
type: "input",
inputType: "text",
label: "First Name",
model: "firstName",
placeholder: "First Name",
required: true,
styleClasses: "col-xs-12 col-md-6",
},
{
type: "input",
inputType: "text",
label: "Last Name",
model: "lastName",
placeholder: "Last Name",
required: true,
styleClasses: "col-xs-12 col-md-6",
},
{
type: "input",
inputType: "email",
label: "Email",
model: "email",
placeholder: "Email Address",
styleClasses: "col-xs-12 col-md-6",
}
],
}]
}
Basically, I want two columns for the form (unless the screen is too small). But because of the fieldset issue with the row class, I get the full width row and 50% width columns, but they are stacked vertically. So the column widths are correct, but instead of the 2 columns being side-by-side, they are half-width columns, one on top of the other, with lots of empty space to the right.
Is there anyway to set an option to substitute a different tag for the the fieldset tag? Or some other way to accomplish what I'm looking for?
This isn't currently possible, but is planned for v3. See: #259
The fieldset can be changed by passing a "tag" into VFG.
<vue-form-generator tag="div" ... />
This will change all of the "fieldset" tags into "div", for example.
@zoul0813, I must have missed that in the docs. That did the trick. Thanks!
Don't believe that update has made it into the docs yet, it's fairly new.
tag is added to the doc
Most helpful comment
The fieldset can be changed by passing a "tag" into VFG.
<vue-form-generator tag="div" ... />This will change all of the "fieldset" tags into "div", for example.