File tree 1 file changed +8
-16
lines changed
Filter options
reference/forms/types/options
1 file changed +8
-16
lines changed
Original file line number Diff line number Diff line change @@ -3,23 +3,15 @@ help_attr
3
3
4
4
**type**: ``array`` **default **: ``array()``
5
5
6
- Sets the HTML attributes for the help element, which will be used
7
- when rendering the help part for the field. It's an associative array with HTML
8
- attribute as a key. This attributes can also be directly set inside the
9
- template:
6
+ .. versionadded:: 4.2
7
+ The ``help_attr`` option was introduced in Symfony 4.2 .
10
8
11
- .. configuration-block::
9
+ Sets the HTML attributes for the element used to display the help message of the
10
+ form field. Its value is an associative array with HTML attribute names as keys.
11
+ These attributes can also be set in the template :
12
12
13
- .. code-block:: twig
13
+ .. code-block:: twig
14
14
15
- {{ form_help(form.name, 'Your name', {
15
+ {{ form_help (form.name , ' Your name' , {
16
16
' label_attr' : {' class' : ' CUSTOM_LABEL_CLASS' }
17
- }) }}
18
-
19
- .. code-block:: php
20
-
21
- echo $view['form']->help(
22
- $form['name'],
23
- 'Your name',
24
- array('label_attr' => array('class' => 'CUSTOM_LABEL_CLASS'))
25
- );
17
+ }) }}
You can’t perform that action at this time.
0 commit comments