Forum: Ruby on Rails Syntax for <input type=hidden> in rhtml????

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Prashant T. (Guest)
on 2006-03-10 11:37

I am new to ROR. PLease tell me what is syntax of creating hidden field
in form inside RHTML file. I knonw the syntax for text box (<%=
text_field 'product_item','product_id', :value=>>)
But I don't know syntax for hidden field(like <input type=hidden> in

Please tell me.

Thanx in advance.
Chang Sau S. (Guest)
on 2006-03-10 11:48
(Received via mailing list)

You should try to check up the rails api at

anyway the syntax is *hidden_field*(object, method, options = {})

Prashant T. wrote:
> Thanx in advance.
> Prash

Sau S.
Jonathan V. (Guest)
on 2006-03-10 12:12
(Received via mailing list)
Instead of text_field, use hidden_field. Simple!

This topic is locked and can not be replied to.