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 -- Posted via http://www.ruby-forum.com/.
Chang Sau Sheong
2006-Mar-10 09:45 UTC
[Rails] Syntax for <input type=hidden> in rhtml????
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:> 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 > >-- Sau Sheong http://www.saush.com http://read.saush.com http://jaccal.sourceforge.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060310/b45a30c5/attachment.html
Instead of text_field, use hidden_field. Simple! -Jonathan.> 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).-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060310/28fe97d6/attachment.html