Skip to content

Commit e0d1516

Browse files
committed
minor #13316 [Form] Add description of label_html option (przemyslaw-bogusz)
This PR was squashed before being merged into the master branch (closes #13316). Discussion ---------- [Form] Add description of label_html option | Q | A | ------------- | --- | Feature PR | symfony/symfony#31375 | PR author(s) | @przemyslaw-bogusz | Merged in | WCM Commits ------- 7a74bb3 [Form] Add description of label_html option
2 parents 83d6d53 + 7a74bb3 commit e0d1516

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

reference/forms/types/button.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A simple, non-responsive button.
1313
| options | - `attr_translation_parameters`_ |
1414
| | - `disabled`_ |
1515
| | - `label`_ |
16+
| | - `label_html`_ |
1617
| | - `label_translation_parameters`_ |
1718
| | - `row_attr`_ |
1819
| | - `translation_domain`_ |
@@ -53,6 +54,8 @@ as a key. This can be useful when you need to set a custom class for the button:
5354

5455
.. include:: /reference/forms/types/options/button_label.rst.inc
5556

57+
.. include:: /reference/forms/types/options/label_html.rst.inc
58+
5659
.. include:: /reference/forms/types/options/button_translation_domain.rst.inc
5760

5861
label_translation_parameters

reference/forms/types/form.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ on all types for which ``FormType`` is the parent.
4242
| | - `block_prefix`_ |
4343
| | - `disabled`_ |
4444
| | - `label`_ |
45+
| | - `label_html`_ |
4546
| | - `row_attr`_ |
4647
| | - `translation_domain`_ |
4748
| | - `label_translation_parameters`_ |
@@ -172,6 +173,8 @@ of the form type tree (i.e. it cannot be used as a form type on its own).
172173

173174
.. include:: /reference/forms/types/options/label.rst.inc
174175

176+
.. include:: /reference/forms/types/options/label_html.rst.inc
177+
175178
.. include:: /reference/forms/types/options/row_attr.rst.inc
176179

177180
.. include:: /reference/forms/types/options/translation_domain.rst.inc
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
``label_html``
2+
~~~~~~~~~~~~~~
3+
4+
**type**: ``bool`` **default**: ``false``
5+
6+
By default, the contents of the ``label`` option are escaped before rendering
7+
them in the template. Set this option to ``true`` to not escape them, which is
8+
useful when the label contains HTML elements.

0 commit comments

Comments
 (0)