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

Mark picture Mark · Aug 8, 2012 · Viewed 40.5k times · Source

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 => '[email protected]' %>

Answer

pgrosslicht picture pgrosslicht · Aug 8, 2012
<%= f.input :user, :input_html => { :value => '[email protected]' } %>