2-column select lists (Available/Selected)

I’m trying to get one of those 2-column select lists (where there’s an
“Add>>” and a “<<Remove” button between them) working for a Rails
application. First of all, what the heck is this thing called?

You’d list all of the available items in one select list, and the
selected ones in the other.
Items move from one list to the other, but can’t be in both (mutually
exclusive). This would be an alternative to a huge list of
checkboxes.

An example:
http://www.mikenimer.com/downloads/examples/89C5C90F-4E22-1671-56455682AC423A19/index.cfm

Has anyone done something like this in Rails yet? The submit would be
tricky as it would need to pass back the id’s that are in the
“selected” list. Also keeping state after an error returns you to the
page might be a little difficult…

I was able to get started with this:

http://opensvn.csie.org/habtm_helper_plugin/trunk

thanks, this looks good, very clean. It’s not super complicated, but I
didn’t want to reinvent the wheel.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs