Hey everyone,
This seems really elementary and I have no clue what is wrong... I have
a form that has two multiple select boxes (using some javascript to
shift items from the left select box to the right box and vice versa)
and I want to grab what is in the second box after the user clicks
submit. It seems that each time I try to get that info in my controller,
it is returning nil. My form is as follows:
I just figured out something... If I actually select something in the
second box, it works... but if there are multiple ones, it doesn't. If
multiple items are selected, it only passes the first in the box... I
realize now that this is an HTML problem and I will have to just do a
bunch of googling, but if anyone knows how to overcome this, any help
would be appreciated.
Hi, I'm just starting a project and want to implement the same
functionality. I would be very interested in knowing if/how you
resolved this issue. How are you handling loading both lists on page
load? That is, when you are editing an item, I would assume that you
would only load the "available" list with non-selected items and the
"selected" list with only those items previously selected.
Hey everyone,
This seems really elementary and I have no clue what is wrong... I have
a form that has two multiple select boxes (using some javascript to
shift items from the left select box to the right box and vice versa)
and I want to grab what is in the second box after the user clicks
submit. It seems that each time I try to get that info in my controller,
it is returning nil. My form is as follows:
pls try to name <select name="sel2"> like this (rest is same)
<option value="1">All Users (default)</option>
</select>
In the controller pls try params[:sel2]||. I think this will give u
the all the values of all the selected options in the select drop down.