Skip to content

Navigation Menu

Sign in
Appearance settings

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 2ef93a4

Browse filesBrowse files
committed
Merge pull request symfony#1442 from Dinduks/add_doc_for_escape_label
[Form] Add doc for the escape_label option
2 parents f86dc39 + 4bf8cc8 commit 2ef93a4
Copy full SHA for 2ef93a4

File tree

Expand file treeCollapse file tree

2 files changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-0
lines changed

‎reference/forms/types/field.rst

Copy file name to clipboardExpand all lines: reference/forms/types/field.rst
+2Lines 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
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
escape_label
2+
~~~~~~~~~~~~
3+
**type**: ``Boolean`` **default**: ``true``
4+
5+
.. versionadded:: 2.1
6+
The ``escape_label`` option is new in Symfony 2.1.
7+
8+
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.
9+
10+
.. code-block:: php
11+
12+
$builder->add('acceptRules', 'checkbox', array(
13+
'label' => '<strong>I accept the rules</strong>',
14+
'escape_label' => false,
15+
));
16+
17+

0 commit comments

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