@@ -20,8 +20,8 @@ label you want to display as the second argument.
20
20
{{ form_label(form.name) }}
21
21
22
22
{# The two following syntaxes are equivalent #}
23
- {{ form_label(form.name, 'Your Name', { 'attr ': {'class': 'foo'} }) }}
24
- {{ form_label(form.name, null, { 'label': 'Your name', 'attr ': {'class': 'foo'} }) }}
23
+ {{ form_label(form.name, 'Your Name', {'label_attr ': {'class': 'foo'}}) }}
24
+ {{ form_label(form.name, null, {'label': 'Your name', 'label_attr ': {'class': 'foo'}}) }}
25
25
26
26
form_errors(form.name)
27
27
----------------------
@@ -44,7 +44,7 @@ or collection of fields, each underlying form row will be rendered.
44
44
.. code-block :: jinja
45
45
46
46
{# render a widget, but add a "foo" class to it #}
47
- {{ form_widget(form.name, { 'attr': {'class': 'foo'} }) }}
47
+ {{ form_widget(form.name, {'attr': {'class': 'foo'}}) }}
48
48
49
49
The second argument to ``form_widget `` is an array of variables. The most
50
50
common variable is ``attr ``, which is an array of HTML attributes to apply
@@ -60,7 +60,7 @@ label, errors and widget.
60
60
.. code-block :: jinja
61
61
62
62
{# render a field row, but display a label with text "foo" #}
63
- {{ form_row(form.name, { 'label': 'foo' }) }}
63
+ {{ form_row(form.name, {'label': 'foo'}) }}
64
64
65
65
The second argument to ``form_row `` is an array of variables. The templates
66
66
provided in Symfony only allow to override the label as shown in the example
0 commit comments