Forum: Ruby on Rails Ajax.Autocompleter with an empty field

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
97ca2e94ba373515aa387feee67d613e?d=identicon&s=25 Joshua Gitlin (Guest)
on 2006-03-03 00:03
(Received via mailing list)
Hey guys,

I have a field that will have very few autocomplete options. I have
an ajax.autocompleter on it that works great, but I wanted to make it
start autocompleting as soon as the field is blur()ed, so that even
if the field is empty, the list will still appear. Like a combo box
in windows. How can I do this? Setting :min_chars => 0 (or even -1)
didn't work...

6e3e6591ebb75db8d1f94bb67bf681d9?d=identicon&s=25 Chaz_Meister_Rock (Guest)
on 2006-03-11 22:20
97ca2e94ba373515aa387feee67d613e?d=identicon&s=25 Joshua Gitlin (Guest)
on 2006-03-11 23:45
Chaz_Meister_Rock wrote:
> checkout the "frequency" option:

Well, that didn't work. But it made me realize that :min_chars isn't
working, either! My code is:

text_field_with_auto_complete :the_object, :project_name, {}
                              {:with =>
                               :min_chars => 3,
                               :frequency => 0.1

Yet even with :min_chars => 3, the text filed auto completes with one

Am I doing this wrong?
This topic is locked and can not be replied to.