entering it in a field.
I have the form partial _form.rhtml
<%= error_messages_for 'response' %> <!--[form:response]--> <p><label for="response_title">Title</label><br/> <%= text_field 'response', 'title' %></p> <p><label for="response_body">Body</label><br/> <%= text_area 'response', 'body' %></p> <p><label for="response_user">User</label><br/> <%= text_field 'response', 'user' %></p> <p><label for="response_date">Date</label><br/> <%= datetime_select 'response', 'date' %></p> <%= params[:id]%> <!--[eoform:response]-->
when it goes the controller it passes all the params as
params[:response], but I want to add that params[:id] that I passed in so I can read all of those when I go to the controller,
I can get that to print out so I know it is there. Any suggestions?
EDIT:
I found a solution. You can use hidden_field and have the same parameters as text_field, and then have :value => "something"
<%= hidden_field 'response', 'message_id', :value => params[:id] %>
This post has been edited by Amadeus: 16 June 2007 - 06:44 AM

New Topic/Question
Reply




MultiQuote



|