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.
8c70506408fddb9740b4de7339055c77?d=identicon&s=25 Prashant Tiwari (tiwaripk)
on 2006-03-10 10: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.
D2a5b7975f49e051c1de10f98ea81f63?d=identicon&s=25 Chang Sau Sheong (Guest)
on 2006-03-10 10: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 Tiwari wrote:
> Thanx in advance.
> Prash

Sau Sheong
B07fcd81d491ce2209d7995c4a851f9a?d=identicon&s=25 Jonathan Viney (Guest)
on 2006-03-10 11:12
(Received via mailing list)
Instead of text_field, use hidden_field. Simple!

This topic is locked and can not be replied to.