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:
<% form_remote_tag :url => { :action => :submit_free_report },
:update => :results,
:complete => visual_effect(:highlight, 'results') do %>
| First Name |
<%= text_field_tag :FirstName %> |
</td>
|
| Last Name |
<%= text_field_tag :LastName %> |
<%= image_submit_tag '/images/form_button.gif', :name => 'Send
Report' %>
|
| Email |
<%= text_field_tag :Email %> |
|
<% end %>
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
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!:
<% form_remote_tag :url => { :action => :submit_free_report },
:update => :results,
:complete => visual_effect(:highlight, ‘results’) do %>
| First Name |
<%= text_field_tag :FirstName %> |
</td>
|
| Last Name |
<%= text_field_tag :LastName %> |
<%= image_submit_tag '/images/form_button.gif', :name => 'Send
Report' %>
|
| Email |
<%= text_field_tag :Email %> |
|
<% end %>
Shandy N. 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.