params not available w form_remote_tag call

Hi guys...

I'm having an issue that seems so basic to me, but I can't figure it out. I have a partial which is a form below:

<table>   <div id="report_form">

    <% form_remote_tag :url => { :action => :submit_free_report },         :update => :results,         :complete => visual_effect(:highlight, 'results') do %>   <tr>     <td>First Name</td>     <td><%= text_field_tag :FirstName %></td>     <td>

    </td>   </tr>   <tr>     <td>Last Name</td>     <td><%= text_field_tag :LastName %></td>     <td>       <div class="report_submit">         <%= image_submit_tag '/images/form_button.gif', :name => 'Send Report' %>       </div>     </td>   </tr>   <tr>     <td>Email</td>     <td><%= text_field_tag :Email %></td>     <td></td>   </tr>   <% end %>   </div> </table>

Pretty basic.. but in the submit_free_report method of my controller when I try to access params[:Email] it is empty. This seems so simple to me, but I can't figure out why the form isn't setting the params object.

Please help.

What does the log file say? Does it show that the params are being passed to the method?

-S

Shandy Nantz wrote:

What does the log file say? Does it show that the params are being passed to the method?

-S

Thanks for the response..

Here are the parameters being passed:

"authenticity_token"=>"5625b8c5132afcbb131798ac6da41677572d1a2b", "action"=>"submit_free_report", "controller"=>"welcome"

also.. not that this matters, but the form is being rendered from the index page like so:

<%= render(:partial => "shared/free_report") %>

i don't get why the parameters aren't being passed.

Ok... I think I figured it out, and I'm posting the answer below for others.

I moved the form outside the table like so, and it works!:

<div id="report_form">

<% form_remote_tag :url => { :action => :submit_free_report },         :update => :results,         :complete => visual_effect(:highlight, 'results') do %> <table>

  <tr>     <td>First Name</td>     <td><%= text_field_tag :FirstName %></td>     <td>

    </td>   </tr>   <tr>     <td>Last Name</td>     <td><%= text_field_tag :LastName %></td>     <td>       <div class="report_submit">         <%= image_submit_tag '/images/form_button.gif', :name => 'Send Report' %>       </div>     </td>   </tr>   <tr>     <td>Email</td>     <td><%= text_field_tag :Email %></td>     <td></td>   </tr>

</table> <% end %> </div>