<< Back to All Posts
How can you have a hidden field with simple form?
= simple_form_for @movie do |f| = f.hidden :title, "some value" = f.button :submit
try this
= f.input :title, :as => :hidden, :input_html => { :value => "some value" }
Thanks, that worked.
Shortest Yet !!!
= f.hidden_field :title, :value => "some value"
in ruby 1.9
= f.hidden_field :title, value: "some value"
<< Back to All Posts
Lance Carletti
How can you have a hidden field with simple form?
Prince Gill
try this
Lance Carletti
Thanks, that worked.
Prince Gill
Shortest Yet !!!
in ruby 1.9