Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use row style class on groups #401

Closed
docmattman opened this issue Mar 1, 2018 · 5 comments
Closed

Can't use row style class on groups #401

docmattman opened this issue Mar 1, 2018 · 5 comments

Comments

@docmattman
Copy link

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?

@dflock
Copy link
Collaborator

dflock commented Mar 1, 2018

This isn't currently possible, but is planned for v3. See: #259

@dflock dflock closed this as completed Mar 1, 2018
@zoul0813
Copy link
Member

zoul0813 commented Mar 1, 2018

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 zoul0813 reopened this Mar 1, 2018
@docmattman
Copy link
Author

@zoul0813, I must have missed that in the docs. That did the trick. Thanks!

@zoul0813
Copy link
Member

zoul0813 commented Mar 2, 2018

Don't believe that update has made it into the docs yet, it's fairly new.

@lionel-bijaoui
Copy link
Member

lionel-bijaoui commented Jun 28, 2018

tag is added to the doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants