I have an Entity Article
which contains:
/**
* @ORM\Column(type="array")
*/
private $data;
My data
field can be in different shapes, either (x1 & x2)
or (y1, y2 & y3)
.. etc.
I created a FormType
for each one of them but i'm confused on how i present those prototypes to the ArticleType
form and the user can be free to choose to insert either X or Y or multiple of those, I know i need a Collection
for that with allow_add
option but i need a way to insert multiple types
in that collection.
My plan is to have X number of buttons, each button has a prototype, once the user click on that button, the prototype will be inserted to the form[data] field.
Any thoughts ?