let's say I have Post entity that has $title field (array type) and I want to allow the user to write the title of the post in multiple-language
/**
* Post
*
* @ORM\Table(name="posts")
* @ORM\Entity
*/
class Post
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var array
*
* @ORM\Column(name="title", type="array", nullable=true)
*/
protected $title;
}
How can I create form type that generate those fields when user want to submit a new post?
<input type="text" name="title[en]" />
<input type="text" name="title[fr]" />