Forum: Ruby on Rails Autocompleting combobox: fact or fiction?

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.
Ffc38459818ed3e1182553d45e6f2479?d=identicon&s=25 Gustav Paul (s04015)
on 2005-11-24 20:58

I've got a autocompleting textfield that works
wonderfully, but how do I make the value of the selected option submit
with the form...for that matter, do autocompleting textboxes have
'option' tags, or is what I want to do simply impossible 8[

B6e90ad1e69d563f1f13cccffe137262?d=identicon&s=25 Simon.Santoro (Guest)
on 2005-11-24 22:09
(Received via mailing list)
gustav paul wrote:

<%= start_form_tag :action => 'list' %>
Title: <%= text_field_with_auto_complete :movie, :title %>
<%= submit_tag 'Search' %>
<%= end_form_tag %>

auto_complete_for :movie, :title

def list
   @movies =  Movie.find(:all, :conditions => ["title like ?", "%" +
unless params[:movie] then "" else params[:movie]["title"] end + "%"],
:order => "title")
   @categories = Category.find(:all)

works fine for me
This topic is locked and can not be replied to.