I have the following form of Symfony2:
public function buildForm(FormBuilder $builder, array $options) { $builder ->add('submitter_is_home', 'choice', array( 'expanded' => true, 'choices' => array('1' => 'Home', '' => 'Away'), 'data' => '1', )) ; }
(I have clarified the other fields for clarity.)
When I visit this form in the browser, the "Home" option is not selected. I also checked the source and it does not look like the corresponding attribute.
Does the default value for switches have different meanings than other types of choice
fields? What could be happening here?
source share