# Auto\_complete text field not showing drop-down box properly

**URL:** <https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965>\
**Category:** Rails\
**Created:** [September 23, 2009, 5:22am UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965 "2009-09-23T05:22:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [September 23, 2009, 5:22am UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965/1 "2009-09-23T05:22:47Z")

</div>

This may be more of an Ajax question than a Rails question, but I’m  
pretty new to Rails and know approximately zero JS. I’d love if  
someone could give me a little direction.

I’m using pat shaughnessy’s nested text\_field\_with\_auto\_complete  
plugin, and it seems to be _mostly_ working properly (after many hours  
of fiddling). However, the drop-down box is not displayed properly.  
Instead of rendering a box with items that can be highlighted, it’s  
just rendering a bulleted list. I can still click on items in the  
bullet list, and they’ll fill in the box properly. They also fade away  
if I go do something else for too long.

I don’t even know where to begin to look.

Many thanks,  
John

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [September 23, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965/2 "2009-09-23T18:25:07Z")

</div>

this might sound weird, but in your view of the list try putting  
everything on the same line i.e.:

- somthing 

Becomes:

    - something

I think I remember that fixing my problem, although it might not work  
for you.

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [September 23, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965/3 "2009-09-23T21:49:21Z")

</div>

Hi Mark,

Thanks. I’ll give that a try, but it seems strange that it should even  
happen; my view is simply:

\<%= auto\_complete\_result @campuses, :name %\>

Shouldn’t that be formatting it correctly?

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [September 23, 2009, 10:24pm UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965/4 "2009-09-23T22:24:30Z")

</div>

Sounds to me like you’re missing styling.

I use [GitHub - grosser/simple\_auto\_complete: Rails: Simple, customizable, unobstrusive - Autocomplete](http://github.com/grosser/simple_auto_complete) that comes with  
an example CSS that works just fine for me. That might give you some  
clues, but you’ll probably have to modify it to work with the provided  
classes and ids.

---

<div class="post-metadata">

**Author:** ![princenamor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Post date:** [September 24, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/auto-complete-text-field-not-showing-drop-down-box-properly/175965/5 "2009-09-24T22:07:04Z")

</div>

Found the problem! I was using :skip\_style =\> true in the options for  
the text field. When I change that to false, it loads correctly.

Thanks!

John
