SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Monday, June 2, 2008

ActionView::Helpers::FormHelper

hidden_field


Description
hidden_field(object_name, method, options = {})

Works just like text_field, but returns an input tag of the "hidden" type instead.
Examples:

<%= hidden_field :staff, :staff_id, :value => "#{staff_app.id}" %>

For passing param values in hidden_field then pass like this

<%=hidden_field :id,:name,:value=>params[:id] %>