Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb22cef

Browse filesBrowse files
committed
Minor reword
1 parent da5aa3b commit fb22cef
Copy full SHA for fb22cef

File tree

1 file changed

+8
-16
lines changed
Filter options

1 file changed

+8
-16
lines changed

‎reference/forms/types/options/help_attr.rst.inc

Copy file name to clipboardExpand all lines: reference/forms/types/options/help_attr.rst.inc
+8-16Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,15 @@ help_attr
33

44
**type**: ``array`` **default**: ``array()``
55

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.
108

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:
1212

13-
.. code-block:: twig
13+
.. code-block:: twig
1414

15-
{{ form_help(form.name, 'Your name', {
15+
{{ form_help(form.name, 'Your name', {
1616
'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+
}) }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.