Hi friends
I have problem with auto_complete_field.
I have used auto_complete_field with in the remote_form_for. But when we enter the text in auto_complete_field two actions are calling
1. auto_complete_field action 2. remote_form_for action
I need to restrict the form action when we enter text on auto_complete_field
Could u give any ideas?
<div id="<%=filter_criterion.dom_id%>">
<% remote_form_for :filter_criterion, :html => {:id => filter_criterion.dom_id + '_form' } do %>
<%= text_field :search, :oid, :size => 20, :value => result %> <div class="auto_complete" id="search_oid_auto_complete"></div> <%= auto_complete_field :search_oid, :url => {:action => 'auto_complete_context', :controller => 'admin',:frequency => 5000} %> <% end %>
<%= observe_form filter_criterion.dom_id + '_form',:frequency => 5,:url => {:action => 'update_filter_criterion', :controller=>'filters', :id=>filter_criterion.id}, :with => 'value=value' %> </div>