Forum: Ruby on Rails select_tag and multiple => true

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
11bd67aedc131020a51440fad59116cc?d=identicon&s=25 Andrew Filipowski (Guest)
on 2005-12-14 20:49
(Received via mailing list)
I was looking at how a select tag when set to multiple = true is
returned is just a comma separated list. My issue is that I would
rather not add quotes around the values in the list and it is
possible that my list may contain a comma. Is there a way to force
either to wrap the values returned to the server in quotes or force
an array to be returned as opposed to the comma separated one that I
see?

Thanks

Andrew
0e6f96b18967a87a50fe83c8660dbf76?d=identicon&s=25 chris clark (Guest)
on 2005-12-14 21:07
(Received via mailing list)
That is controlled by the browser, if you really need to you could
create a hidden form field and populate it using javascript.
If the select is dynamically created its best to use the id column for
the value and translate as needed.
This topic is locked and can not be replied to.