I would like to record a choice of checkboxes in my data base. I get this error:
ContextErrorException: Notice: Array to string conversion in //vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 120
My form :
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('adult_available', 'choice', array(
'choices' => array('A' => 'Adult', 'C' => 'Children'),
'required' => false,
'expanded' => true,
'multiple' => true
));
My field :
/**
* @ORM\Column(type="string", columnDefinition="CHAR(1) NOT NULL")
*/
protected $adult_available;
My form looks good! But when I submit I got the ContextErrorException exception
Thanks!