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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8c70506408fddb9740b4de7339055c77?d=identicon&s=25 Prashant Tiwari (tiwaripk)
on 2006-03-10 10:37
Hi,

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=>product.id%>)
But I don't know syntax for hidden field(like <input type=hidden> in
HTML).

Please tell me.

Thanx in advance.
Prash
D2a5b7975f49e051c1de10f98ea81f63?d=identicon&s=25 Chang Sau Sheong (Guest)
on 2006-03-10 10:48
(Received via mailing list)
Hi,

You should try to check up the rails api at http://api.rubyonrails.org/

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


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


--
Sau Sheong

http://www.saush.com
http://read.saush.com
http://jaccal.sourceforge.net
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!

-Jonathan.
This topic is locked and can not be replied to.