Autocompleting combobox: fact or fiction?


#1

Hey,

I’ve got a script.aculo.us 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[

Thanks,
Gustav

removed_email_address@domain.invalid


#2

gustav paul wrote:

removed_email_address@domain.invalid

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

controller:
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)
end

works fine for me