# Editable drop down menu

**URL:** <https://www.ruby-forum.com/t/editable-drop-down-menu/133809>\
**Category:** Rails\
**Created:** [April 3, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809 "2008-04-03T21:12:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 3, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809/1 "2008-04-03T21:12:44Z")

</div>

Does anyone know if there’s a method in rails to do this? Basically I  
want there to be a drop down menu with items to chose from, but also the  
ability to enter whatever you want in the box. I just dont know offhand  
if there’s something for that. Thanks alot 🙂

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 4, 2008, 12:35am UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809/2 "2008-04-04T00:35:56Z")

</div>

Rails could do that just fine, but HTML has a bit of an issue with it.

The only way you can reasonably replicate this behaviour in my opinion  
is by using autocomplete javascript (in prototype/scriptaculous) with  
a hidden div that shows a list of possible results when you start  
typing by using observe\_field.

Good luck, though, because it takes some effort to get it working.

I suggest creating a whole new rails app just to muck around with this  
feature, and then once you have what you like, grab the working code  
and plug it into the place where you needed it.

Julian.

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) VIDEO #3  
OUT APRIL 6  
[http://sensei.zenunit.com/](http://sensei.zenunit.com/)

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 4, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809/3 "2008-04-04T18:13:37Z")

</div>

hm ok yeah I guess that would work pretty good too. I’ll try that out  
instead. Thank alot 🙂

---

<div class="post-metadata">

**Author:** ![pimeamark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Post date:** [April 5, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809/4 "2008-04-05T18:35:14Z")

</div>

@Mark: The described autocomplete functionality was originally part of  
the Rails framework and was moved out into a plugin with 2.x. So you  
don’t need “good luck,” just a good plugin.
