# Remote\_form\_for with auto\_complete\_field

**URL:** <https://www.ruby-forum.com/t/remote-form-for-with-auto-complete-field/124904>\
**Category:** Rails\
**Created:** [January 3, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/remote-form-for-with-auto-complete-field/124904 "2008-01-03T17:33:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karnirevuri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/838e76/32.png) [@karnirevuri](https://www.ruby-forum.com/u/karnirevuri)\
**Post date:** [January 3, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/remote-form-for-with-auto-complete-field/124904/1 "2008-01-03T17:33:01Z")

</div>

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?

\<% remote\_form\_for :filter\_criterion, :html =\> {:id =\>  
filter\_criterion.dom\_id + ‘\_form’ } do %\>

\<%= text\_field :search, :oid, :size =\> 20, :value =\> result %\>

  
\<%= 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’ %\>
