On Thu, May 21, 2009 at 4:30 PM, prabesh shrestha <[email protected]> wrote:
>
> How do I get the value form the hidden field and pass it to the
> controller?Also how do I get the value in the controller.

If you include a hidden field in a form, you can access it from params
in the controller

so, if you have the following in the view
hidden_field_tag 'field_name', 'value'

You can get it in the controller as
params[:field_name]

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to