Skip to content

Commit 3929e2a

Browse files
committed
[Form] Use duplicate_preferred_choices to set value of ChoiceType
When the preferred choices are not duplicated an option has to be selected in the group of preferred choices. Closes #58561
1 parent e982e14 commit 3929e2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Extension/Core/Type/ChoiceType.php

+2
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ public function buildView(FormView $view, FormInterface $form, array $options)
281281
*/
282282
public function finishView(FormView $view, FormInterface $form, array $options)
283283
{
284+
$view->vars['duplicate_preferred_choices'] = $options['duplicate_preferred_choices'];
285+
284286
if ($options['expanded']) {
285287
// Radio buttons should have the same name as the parent
286288
$childName = $view->vars['full_name'];

0 commit comments

Comments
 (0)