form_remote_tag doesn't pass any form params

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 %>     <tr>         <td>             <%= @project.name %>         </td>     </tr>     <tr>         <td>             Current high bid: < %=number_to_currency(@project.current_bid.nil? ? 0.00 : @project.current_bid.amount)%><br/>         </td>     </tr>     <tr>         <td>             <%= text_field_tag 'bid_amount' %><br/>         </td>     </tr>     <tr>         <td>             <%= submit_tag "send bid", :name=>"confirm"%><br/>         </td>     </tr> <%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

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"%><br/>

...

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.

I tried that and came back with the same problem.

Scott wrote:

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 %>     <tr>         <td>             <%= @project.name %>         </td>     </tr>     <tr>         <td>             Current high bid: < %=number_to_currency(@project.current_bid.nil? ? 0.00 : @project.current_bid.amount)%><br/>         </td>     </tr>     <tr>         <td>             <%= text_field_tag 'bid_amount' %><br/>         </td>     </tr>     <tr>         <td>             <%= submit_tag "send bid", :name=>"confirm"%><br/>         </td>     </tr> <%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.

Wrap your form_remote_tag outside the <table> element rather than inside.