Skip to content

Commit 799a4bd

Browse files
Add description of label_html option
1 parent c223e32 commit 799a4bd

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)