Skip to content

[Form] Replaced "form_widget" by "form_row" in collection example #5133

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

Closed
wants to merge 1 commit into from

Conversation

romaricdrigon
Copy link
Contributor

Hi,

In the Form reference documentation, for the collection field, an example is given about rendering the prototype.
But form_widgetTwig function is used instead of form_row. This is a bad advice in my opinion, as rendered HTML is then different than the one for an already here field. In example, we will be missing the label.

The small fix change the function used.

@wouterj
Copy link
Member

wouterj commented Apr 2, 2015

I think we do want it without the label. You just have a list of inputs, having the label repeated for each option seems not so great to me.

What do others think about this? /cc @xabbuh @webmozart

@xabbuh
Copy link
Member

xabbuh commented May 23, 2015

Imho we should keep the reference as is, but reference the cookbook section that explains how to customise this in #4629. What do you think?

@weaverryan
Copy link
Member

Hey @romaricdrigon!

I agree with keeping things as-is. For the other fields, we're only rendering the errors and widget, so it makes sense to only add the widget (and as Wouter said, we don't really want multiple labels). You could do it either way, but I think we should keep this. It's also consistent with the way that customizing the prototype is described in #5643.

Thanks!

@weaverryan weaverryan closed this Oct 15, 2015
@romaricdrigon romaricdrigon deleted the patch-1 branch April 4, 2019 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants