# Using Multiple select Dropdown with database

**URL:** <https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325>\
**Category:** Rails\
**Created:** [May 4, 2007, 10:39am UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325 "2007-05-04T10:39:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aveo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@aveo](https://www.ruby-forum.com/u/aveo)\
**Post date:** [May 4, 2007, 10:39am UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325/1 "2007-05-04T10:39:49Z")

</div>

Hi all,  
I am working on a database and need the capabilities to have a drop  
down field (list) that can handle multiple selections. I cannot figure  
out how to store the data in the database, retrieve the values from the  
database and the type of field to choose. For example, I’ve list of  
locations in my view.rhtml .I want to store selected values in database  
and if retrieve them when edit the data.  
Please help me out.

Thanks,

---

<div class="post-metadata">

**Author:** ![aveo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@aveo](https://www.ruby-forum.com/u/aveo)\
**Post date:** [July 6, 2007, 3:04am UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325/2 "2007-07-06T03:04:49Z")

</div>

I have the same problem. Did you ever get this figured out?

---

<div class="post-metadata">

**Author:** ![aveo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@aveo](https://www.ruby-forum.com/u/aveo)\
**Post date:** [December 28, 2007, 6:50pm UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325/3 "2007-12-28T18:50:49Z")

</div>

Jim wrote:

> I have the same problem. Did you ever get this figured out?

I also have same problem. Get to ctrl and click on dropdown list but  
cant save selections to DB.

---

<div class="post-metadata">

**Author:** ![aveo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@aveo](https://www.ruby-forum.com/u/aveo)\
**Post date:** [December 28, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325/4 "2007-12-28T20:55:26Z")

</div>

Rahul Ha wrote:

> Hi all,  
> I am working on a database and need the capabilities to have a drop  
> down field (list) that can handle multiple selections. I cannot figure  
> out how to store the data in the database, retrieve the values from the  
> database and the type of field to choose. For example, I’ve list of  
> locations in my view.rhtml .I want to store selected values in database  
> and if retrieve them when edit the data.  
> Please help me out.
> 
> Thanks,

If you type in the following in your combo box code then though you wont  
get a drop down list but you will get a multiple select box.

:multiple=\>true
