Forum: Ruby on Rails pass values with autocomplete textfield

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.
Chris Fong (Guest)
on 2006-02-09 20:51
(Received via mailing list)
Hi all,

I have a simple app that has an autocomplete textfield in my view.  I
now want
to be able to pass the value of a select to my controller when my
auto_complete_for_location_name is called.  My goal is to be able to
filter the
autocomplete results by the value of the select.

My view code looks like this:

<%= form_remote_tag :update => "search_results",
:url => { :action => :search } %>
Location:  <%= text_field_with_auto_complete :location, :name %>
<%= select :loc, :type, { |l| [l.location_type] } %>
<%= submit_tag "Search", :class => "search_btn" %>
<%= end_form_tag %>

Is this possible?


This topic is locked and can not be replied to.