symfony/symfony — Issue #3154: [Form] Empty value missing for expanded single-choice field with required set to false
Author: bschussek
Created: 2012-01-19 01:52:03+00:00
State: open

When creating an expanded, single-choice field that is not required

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

an entry for the empty value should be added, but is not.