# Auto\_complete div remains hidden

**URL:** <https://www.ruby-forum.com/t/auto-complete-div-remains-hidden/172880>\
**Category:** Rails\
**Created:** [July 29, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/auto-complete-div-remains-hidden/172880 "2009-07-29T12:13:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![albertosesena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f9ae1b/32.png) [@albertosesena](https://www.ruby-forum.com/u/albertosesena)\
**Post date:** [July 29, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/auto-complete-div-remains-hidden/172880/1 "2009-07-29T12:13:13Z")

</div>

Hi! I’m using Pat Shaughnessy’s auto\_complete fork, working with nested  
forms. It’s working very well, producing the right auto complete query  
and filling up the auto-complete div (as I can see from firebug). Just,  
the div has a style=“display: none;” property always set that’s  
preventing it from showing up!  
Here is my code:

# app/views/letters/\_form.html.erb

\<% form\_for(@letter, :html =\> {:multipart =\> true}) do |letter\_form| %\>  
[…]

 \<% @letter.entities.build unless @letter.entities %\> \<% letter\_form.fields\_for :entities do |entity\_form| %\> \<%= render :partial =\> "entity", :locals =\> {:f =\> entity\_form} %\> \<% end %\> \<%= link\_to 'Aggiungi', '#entity', :class =\> "add\_nested\_item", :rel =\> "entities" %\>
[...] \<% end %\>
# app/views/letters/\_entity.html.erb

 \<%= f.text\_field\_with\_auto\_complete :name, {:size =\> 35}, {:method =\> :get, :skip\_style =\> true} %\> \<%= remove\_link\_unless\_new\_record(f) %\>

This is the generated HTML code after I type a few letters:

[Aggiungi](#entity)

- Joseph Ratzinger

[Rimuovi](#entity)

Any suggestion on why the div is not showing up? I tried searching on  
the net but could not find anything useful. Thanks!

---

<div class="post-metadata">

**Author:** ![albertosesena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f9ae1b/32.png) [@albertosesena](https://www.ruby-forum.com/u/albertosesena)\
**Post date:** [July 29, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/auto-complete-div-remains-hidden/172880/2 "2009-07-29T14:45:36Z")

</div>

You just need to change your css to…

style.display=“block” or “inline”

OR

style.display=

The latter might be needed for IE8.

This is a CSS question not a rails question though.
