Why am I getting an error if several options are selected for choosing a form. This comes directly from the Symfonys site. I changed only the variable name.
$builder->add('genre', 'choice', array( 'choices' => array( 'x' => 'x', 'y' => 'y', 'z' => 'z', ), 'multiple' => true, ));
This is mistake:
Unable to convert value for path property "genre": array expected.
Here is my entity class for this variable:
/** * @var string * * @ORM\Column(name="genre", type="text", nullable=true) */ private $genre;
source share