form_tag and hidden text fields


while designing a form with the form_for tag, I m not being able to
hide my text fields. Here is an excerpt of my code :

<% form_for :foo, @foo, :url => { :controller=>"foo",:action =>
"create" } do |f| %>

<td class="col2"><%= f.text_field :user_id, :type =>
'hidden', :value=> %></td>

The hidden attribute is not being taken into consideration and my
fields are still visible.

Can anyone help with that.



all you need is

<%= f.hidden_field_tag 'name', :params[:name] %>