Choice field default value
问题 I have the following form: public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('type', ChoiceType::class, array( 'expanded' => true, 'multiple' => false, 'choices' => array( 'Friend' => 'friend', 'Guide' => 'guide' ) )); } How can I make 'Friend' checkbox to be checked by default when the form is rendered ? 回答1: I think you should try with data option, but it's just in the case where you don't even have a data saved inside your object, because it will