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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
What does the log file say? Does it show that the params are being passed to the method? -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Shandy Nantz wrote:> What does the log file say? Does it show that the params are being > passed to the method? > > -SThanks 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---