Skip to content

Commit 8036ff1

Browse files
committed
Add doc for the escape_label option
1 parent 354350e commit 8036ff1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

reference/forms/types/field.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ The ``field`` type predefines a couple of options:
2222
.. include:: /reference/forms/types/options/attr.rst.inc
2323

2424
.. include:: /reference/forms/types/options/translation_domain.rst.inc
25+
26+
.. include:: /reference/forms/types/options/escape_label.rst.inc
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
escape_label
2+
~~~~~~~~~~~~
3+
**type**: ``Boolean`` **default**: ``true``
4+
5+
If set to false, the label's content won't be escaped. This option is useful when wanting to use HTML tags inside a label.
6+
7+
.. code-block:: php
8+
9+
$builder->add('acceptRules', 'checkbox', array(
10+
'label' => '<strong>I accept the rules</strong>',
11+
'escape_label' => false,
12+
));
13+
14+

0 commit comments

Comments
 (0)