I have problem with Symfony2 form choice field (checkbox). It is always false after submit even if I check it to true.
Entity class:
/**
* @var boolean
*
* @ORM\Column(name="isActive", type="boolean")
*/
private $isActive;
Form builder class:
...->add('isActive')
And var_dump when I submit form with field unchecked or checked, result is still the same:
private 'isActive' => boolean false
When I change the form builder class like this:
...->add('isActive', 'choice', ['choices' => [true => 'Yes', false => 'No']])
it works then with integer value:
private 'isActive' => int 1
Does anybody know what am I doing bad?