Skip to content

[Form] Nested form type renders ugly bootstrap horizontal form #18474

Closed
@jongotlin

Description

@jongotlin

I've got a bootstrap-form issue I can’t figure out if it's a real issue or not.

I’m having a form type with a nested form type and are rendering it with {{ form_widget(form) }}. The nested type will get a wrapping form-group and an extra col-sm-2-class making the form look ugly.
screenshot 2016-04-07 20 20 48

An easy solution would be to render the type with {{ form_widget(form.foo) }} but I think there should be a way to render the whole form with just passing the form to form_widget.

Modifying the block form_row to only render the bootstrap markup and label if form.children is empty solves it but it's kinda dramatic and might not be the wanted solution. Please give me advice before I eventually open a pr for it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions