I have not found any easy way to accomplish to simply check a Checkbox by default. That can not be that hard, so what am i missing?
You can also just set the attr attribute in the form builder buildForm method:
$builder->add('isPublic', CheckboxType::class, array( 'attr' => array('checked' => 'checked'), ));
1.4m articles
1.4m replys
5 comments
57.0k users