all you need is
<%= f.hidden_field_tag ''name'', :params[:name] %>
On Jul 11, 2:14 pm, joel
<joel.soor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> 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| %>
>
> <tr>
> <td class="col2"><%= f.text_field :user_id, :type =>
> ''hidden'', :value=>current_user.id %></td>
> </tr>
>
> The hidden attribute is not being taken into consideration and my
> fields are still visible.
>
> Can anyone help with that.
>
> Regards,
>
> Joel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---