Answer the question
In order to leave comments, you need to log in
Symfony duplicates the radio inputs at the end of the form on its own if you specify required=false on the form, what's the reason?
An example of what it looks like:
Form code:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('integratedPunchout', CheckboxType::class, [
'required' => false,
'empty_data' => false,
])->add('eprocurementSystemUsed', ChoiceType::class, [
'choices' => [
'Ariba' => AccountSetting::EPROCURMENT_SYSYTEM_ARIBA,
'Proactis' => AccountSetting::EPROCURMENT_SYSYTEM_PROACTIS,
'Coupa' => AccountSetting::EPROCURMENT_SYSYTEM_COUPA,
],
'expanded' => true,
'multiple' => false,
'required' => false,
'empty_data' => null,
])->add('eprocurementLevel', ChoiceType::class, [
'choices' => [
'PDF Orders' => AccountSetting::EPROCURMENT_LEVEL_PDF,
'cXML Orders' => AccountSetting::EPROCURMENT_LEVEL_CXML,
'Full Integration' => AccountSetting::EPROCURMENT_LEVEL_FULL_INTEGRATION,
],
'expanded' => true,
'multiple' => false,
'required' => false,
'empty_data' => null,
])->add('unspsc', CheckboxType::class, [
'required' => false,
'empty_data' => false,
]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question