= simple_form_for @foo do |f|
# this works
= f.hidden_field :asdf, :value => @some.thing
# this works
= f.input :asdf, :as => "hidden", :input_html => { :value => @some.thing }
# Why doesn't this work, exactly?
= f.input :title, :as => "hidden", :value => @some.thing
When I look at my log I see that value is coming through as an empty string in the latter input, but it's not clear to me why this is happening.
f.hidden_field
is a ActionView::Helpers::FormHelper while f.input
belongs to SimpleForm.
The syntax is similar but has some differences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With