I am stuck with a piece of code that i can't resolve.
I have an Entity, having some arguments. One of them is an Array.
I would like to display it in a Form as several <select>
tags.
For instance, my array is called param and $param = array (a,b,c)
, i would like to get a html form like
<select name='param[0]'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
</select>
<select name='param[1]'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
</select>
<select name='param[2]'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
</select>
Then, at the from subsmission, i would like the $param
array to be inserted in the database as an array.
I have try to use de Collection type, but i couldn't resolve it. Thanks for your help !