# Form\_remote\_tag doesn't pass any form params

**URL:** <https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172>\
**Category:** Rails\
**Created:** [June 18, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172 "2007-06-18T20:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 18, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172/1 "2007-06-18T20:12:54Z")

</div>

I have a simple form\_remote\_tag like so:

\<% form\_remote\_tag(:url =\> {:controller =\> :contractor, :action =\>  
“bid\_on\_project”, :project =\> @project},  
:success =\>  
“javascript:window.opener.location.reload();javascript:window.close()”)  
do %\>

  
  
\<%= @project.name %\>  
  
  
  
  
Current high bid: \<  
%=number\_to\_currency(@project.current\_bid.nil? ? 0.00 :  
@project.current\_bid.amount)%\>  
  
  
  
  
  
\<%= text\_field\_tag ‘bid\_amount’ %\>  
  
  
  
  
  
\<%= submit\_tag “send bid”, :name=\>“confirm”%\>  
  
  
  
\<%end%\>

However, when I submit the form, all I see is:

Parameters: {“project”=\>“1”, “action”=\>“bid\_on\_project”,  
“controller”=\>“contractor”}

The bid\_amount param never seems to make it in on the list.

When I use a regular form\_tag, this works fine.

Anyone have any ideas?

Thanks,

Scott

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 18, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172/2 "2007-06-18T20:31:58Z")

</div>

Scott wrote:

> \<% form\_remote\_tag(:url =\> {:controller =\> :contractor, :action =\>  
> “bid\_on\_project”, :project =\> @project},  
> :success =\>  
> “javascript:window.opener.location.reload();javascript:window.close()”)  
> do %\>  
> …  
> \<%= submit\_tag “send bid”, :name=\>“confirm”%\>  
>   
> …  
> The bid\_amount param never seems to make it in on the list.

I don’t know the complete story, but we took the remote out of the  
form\_tag, and used submit\_to\_remote. It stands to reason that the Ajax  
now fires from a button. Also, going forward, submit\_to\_remote fixes  
the problem of multiple submits from one form via Ajax.

–  
Phlip  
[Test Driven Ajax (on Rails) [Book]](http://www.oreilly.com/catalog/9780596510657/)  
“Test Driven Ajax (on Rails)”  
assert\_xpath, assert\_javascript, & assert\_ajax

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 18, 2007, 8:51pm UTC](https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172/3 "2007-06-18T20:51:02Z")

</div>

I tried that and came back with the same problem.

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 19, 2007, 1:31am UTC](https://www.ruby-forum.com/t/form-remote-tag-doesnt-pass-any-form-params/107172/4 "2007-06-19T01:31:07Z")

</div>

Scott wrote:

> ```
> </td>
> <%= text_field_tag 'bid_amount' %><br/>
> 
> ```
> 
> Parameters: {“project”=\>“1”, “action”=\>“bid\_on\_project”,  
> “controller”=\>“contractor”}
> 
> The bid\_amount param never seems to make it in on the list.
> 
> When I use a regular form\_tag, this works fine.

Wrap your form\_remote\_tag outside the

 element rather than  
inside.

–  
We develop, watch us RoR, in numbers too big to ignore.
