Skip to content

Commit 4705f83

Browse files
committed
minor #12038 [Form] Mentioned the change in the "preferred choices" behavior (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch (closes #12038). Discussion ---------- [Form] Mentioned the change in the "preferred choices" behavior Fixes #12023. Commits ------- aa2ceae [Form] Mentioned the change in the \"preferred choices\" behavior
2 parents 2833052 + aa2ceae commit 4705f83

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

reference/forms/types/options/preferred_choices.rst.inc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ preferred_choices
33

44
**type**: ``array``, ``callable`` or ``string`` **default**: ``[]``
55

6-
This option allows you to move certain choices to the top of your list with a visual
7-
separator between them and the rest of the options. If you have a form of languages,
8-
you can list the most popular on top, like Bork Bork and Pirate::
6+
This option allows you to display certain choices at the top of your list with a
7+
visual separator between them and the complete list of options. If you have a
8+
form of languages, you can list the most popular on top, like Bork Bork and Pirate::
99

1010
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
1111
// ...
@@ -20,6 +20,12 @@ you can list the most popular on top, like Bork Bork and Pirate::
2020
'preferred_choices' => ['muppets', 'arr'],
2121
]);
2222

23+
.. versionadded:: 4.4
24+
25+
Starting from Symfony 4.4, the preferred choices are displayed both at the
26+
top of the list and at their original locations on the list. In prior
27+
Symfony versions, they were only displayed at the top of the list.
28+
2329
This options can also be a callback function to give you more flexibility. This might
2430
be especially useful if your values are objects::
2531

0 commit comments

Comments
 (0)