File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
reference/forms/types/options Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ more control::
16
16
'no' => false,
17
17
'maybe' => null,
18
18
],
19
- 'choice_label' => function ($choiceValue , $key, $value ) {
20
- if ($value == $choiceValue ) {
19
+ 'choice_label' => function ($value , $key, $choiceValue ) {
20
+ if (true === $value ) {
21
21
return 'Definitely!';
22
22
}
23
23
@@ -28,9 +28,9 @@ more control::
28
28
},
29
29
]);
30
30
31
- This method is called for *each* choice, passing you the choice ``$value`` and the
32
- ``$key`` from the choices array (``$index `` is related to `choice_value`_). This
33
- will give you:
31
+ This method is called for *each* choice, passing you the ``$value`` and
32
+ ``$key`` from the choices array (additional ``$choiceValue `` is related to `choice_value`_).
33
+ This will give you:
34
34
35
35
.. image:: /_images/reference/form/choice-example2.png
36
36
:align: center
You can’t perform that action at this time.
0 commit comments