-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Nested form type renders ugly bootstrap horizontal form #18474
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
Comments
@jongotlin how would you like to see that form rendered? Could you share a screenshot of some quick mockup proposal? Thanks! |
For a compound class, the choice is up to the dev just use: $builder->add('foo', SomeCompoundType::class, array('label' => false)); For handling the label and the block with no child, there is a work in progress (maybe for 3.2 :), see #17609. |
@HeahDude, that's not the case when using the horizontal theme. The Bootstrap divs are rendered even though the label isn't. See |
So this is a nice improvement! 👍 |
Wouldn't that change better fit by overriding |
Or maybe the fix should just to be a new line after the parent label ? |
Overriding |
Thank you for this issue. |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
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 extracol-sm-2
-class making the form look ugly.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 ifform.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.The text was updated successfully, but these errors were encountered: