diff --git a/src/LiveComponent/src/ComponentWithFormTrait.php b/src/LiveComponent/src/ComponentWithFormTrait.php
index c8ab525d49..8f2aceab2c 100644
--- a/src/LiveComponent/src/ComponentWithFormTrait.php
+++ b/src/LiveComponent/src/ComponentWithFormTrait.php
@@ -11,6 +11,7 @@
namespace Symfony\UX\LiveComponent;
+use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
use Symfony\Component\Form\ClearableErrorsInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
@@ -255,25 +256,39 @@ private function extractFormValues(FormView $formView): array
continue;
}
+ //
if (\array_key_exists('checked', $child->vars)) {
- // special handling for check boxes
$values[$name] = $child->vars['checked'] ? $child->vars['value'] : null;
continue;
}
- if (\array_key_exists('choices', $child->vars)
- && $child->vars['required']
- && !$child->vars['disabled']
- && !$child->vars['value']
- && (false === $child->vars['placeholder'] || null === $child->vars['placeholder'])
- && !$child->vars['multiple']
- && !$child->vars['expanded']
- && $child->vars['choices']
+ //