On 18.06.2011 11:10, victor berchet wrote: > Jordi (and Stof), > > What you propose is a good solution, it would be: > > render_row($form, {label: { label: 'foo', attr: {...} }, widget: > { attr: {...} }}) > > so that when rendering a row you are able to override both the label > and the widget option independently. > I'll work on that. > > I have pushed a 'form/theming' branch to my repo if you want a preview > of the rendering refactoring.
Note that what I suggested was to use sub-keys for label and error, but anything at the top-level would go to the widget, because that's the mostly used case I'd guess, and the nesting is really quite annoying. Similarly it could be nice if just passing {"label":"foo"} would be detected and converted to {"label":{"label":"foo"}} automatically, because it's a common use case, and the expanded version is quite ugly. e.g.: render_row(form.field, {"label": "foo", "attr": {"class": "bla"}}) Specifies a label text, and an extra class on the widget render_row(form.field, {"label": {"label":"foo", "attr":{"class":"labelbla"}}, "attr": {"class": "bla"}}) Specifies a label text, an extra class on both widget and label. Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en