# Autocomplete layers

**URL:** <https://www.ruby-forum.com/t/autocomplete-layers/127422>\
**Category:** Rails\
**Created:** [January 29, 2008, 2:15am UTC](https://www.ruby-forum.com/t/autocomplete-layers/127422 "2008-01-29T02:15:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![revanche](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ac91a4/32.png) [@revanche](https://www.ruby-forum.com/u/revanche)\
**Post date:** [January 29, 2008, 2:15am UTC](https://www.ruby-forum.com/t/autocomplete-layers/127422/1 "2008-01-29T02:15:25Z")

</div>

Hi everyone,

I’m trying to extend the functionality of the autocomplete just a little  
bit but without understanding exactly what it’s doing, I’m finding it  
get it where I want. If anyone could lend a hand, it would be  
appreciated.

1. Is there anyway to keep the search results in place, even as the user  
interacts with other elements on the page? Right now, if you click  
anywhere on the site, the results disappear right away.

2. Can the configuration be changed so that a default list appears when  
the query is blank? For instance, if you look at the website [Krop.com](http://Krop.com),  
the autocomplete displays a list even when the search query is blank. In  
this project, I would be happy with either static or dynamic data - just  
something.

3. Is there anyway to configure the autocomplete so that the search  
results actually push data on the rest of the page down - instead of  
overlapping it?

Help on any of these, again, would be great!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![revanche](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ac91a4/32.png) [@revanche](https://www.ruby-forum.com/u/revanche)\
**Post date:** [January 29, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/autocomplete-layers/127422/2 "2008-01-29T17:32:21Z")

</div>

From what you are describing, autocomplete is probably the wrong  
solution. Check into the observe\_field/form method (one of the key  
elements to autocomplete). This should allow you to render your  
default list and watch for user keystrokes in a specified field/form  
with full control over how/where the results are rendered (so you can  
keep them in the form as you desire). The autocomplete stuff, yanked  
to a plugin in 2.x, was really intended for a different purpose.

On Jan 28, 8:15 pm, Neil H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
