Welcome Guest, Not a member yet? Register   Sign In
Multiselect problem
#1

[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!


Messages In This Thread
Multiselect problem - by El Forum - 03-17-2009, 02:42 AM
Multiselect problem - by El Forum - 03-17-2009, 02:51 AM
Multiselect problem - by El Forum - 03-17-2009, 03:05 AM
Multiselect problem - by El Forum - 03-17-2009, 03:34 AM
Multiselect problem - by El Forum - 03-17-2009, 04:21 AM
Multiselect problem - by El Forum - 03-17-2009, 04:33 AM
Multiselect problem - by El Forum - 03-17-2009, 04:50 AM
Multiselect problem - by El Forum - 04-28-2009, 02:51 PM
Multiselect problem - by El Forum - 04-29-2009, 07:22 AM
Multiselect problem - by El Forum - 06-15-2009, 06:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB