Search code examples
ruby-on-railsruby-on-rails-3simple-form

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@example.com' %>

Solution

  • <%= f.input :user, :input_html => { :value => 'user@example.com' } %>