[eluser]Marcel Karras[/eluser]
Hello,
can someone assist me in using multiselects with CodeIgniter?
I tried to implement it the way shown in the documentation but I only get the last selected element inside the
$_POST request.
My form_dropdown function:
Code:
echo form_dropdown ( 'installation',
$installations,
$data['installation'],
'style="height:100px;" multiple="multiple"'
);
The
$data['installation'] array element can be one or more elements so I added the
multiple property in order to force the
form_dropdown function to make multiple selections possible. Is there a more common way to enable the
multiselect property without setting more than one default selection?
When I
var_dump my
$_POST array variable I can see a
'installation' index but it is not an array but a string with the selection option value of the last selected item. Any idea how to solve this issue?
Thanks in advance!