Mark Mark - 4 months ago 18
Ruby Question

Adding a default value to text-input in simple-form

I want to add a default value to a text-input field using simple-form.
With

:placeholder
it is not used as default....

<%= f.input :user, :placeholder => 'user@domain.com' %>

pdg pdg
Answer
<%= f.input :user, :input_html => { :value => 'user@domain.com' } %>