symfony/symfony — Issue #3153: [Form] Choice field with radio buttons can't have an empty value
Author: bschussek
Created: 2012-01-19 01:48:52+00:00
State: open
Labels: Form

When creating an expanded, single choice field with an empty choice

$form = $this->createFormBuilder()
->add('color', 'choice', array(
'choices' => array(
'' => 'Empty',
'990000' => 'Red',
'009900' => 'Green',
),
'expanded' => true,
))
->getForm()
;

I get the error

> Form with empty name can not have parent form.