We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
choice_label
1 parent6be4c20 commitac2214cCopy full SHA for ac2214c
reference/forms/types/options/choice_label.rst.inc
@@ -4,7 +4,7 @@ choice_label
4
.. versionadded:: 2.7
5
The ``choice_label`` option was introduced in Symfony 2.7.
6
7
-**type**: ``callable`` or ``string`` **default**: ``null``
+**type**: ``string``, ``bool``, ``callable`` or ``PropertyPath`` **default**: ``null``
8
9
Normally, the array key of each item in the ``choices`` option is used as the
10
text that's shown to the user. The ``choice_label`` option allows you to take
@@ -48,3 +48,6 @@ If your choice values are objects, then ``choice_label`` can also be a
48
'choices_as_values' => true,
49
'choice_label' => 'displayName',
50
));
51
+
52
+If set to ``false``, all the label tags will be discarded. You can also return
53
+``false`` from the callable to handle each choice differently.