# Form\_remote\_for with collection\_select

**URL:** <https://www.ruby-forum.com/t/form-remote-for-with-collection-select/115725>\
**Category:** Rails\
**Created:** [September 27, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/form-remote-for-with-collection-select/115725 "2007-09-27T23:37:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [September 27, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/form-remote-for-with-collection-select/115725/1 "2007-09-27T23:37:17Z")

</div>

I am having trouble converting a form from form\_remote\_tag to  
form\_remote\_for. The text fields on lines 3-5 work fine, but I can’t get  
the collection\_select on line 2 working (wrong number of arguments  
error).

1 \<% form\_remote\_for (:name, name, :url =\> {:action =\> ‘update\_name’,  
:name =\> name, :id =\> @person}) do |f| %\>  
2 Title:\<%= f.collection\_select(:name, :title\_id,  
@titles, :id, :name) %\>

3 First:\<%= f.text\_field :first\_name %\>

4 Middle:\<%= f.text\_field :middle\_name %\>

5 Last:\<%= f.text\_field :last\_name %\>

6 \<%= submit\_tag ‘Edit’ %\>  
7 \<% end %\>

Any thoughts?
