Skip to content

Instantly share code, notes, and snippets.

@thedillonb
Forked from TechFounder/form.htm.erb
Created January 1, 2014 16:19
Show Gist options
  • Save thedillonb/8209218 to your computer and use it in GitHub Desktop.
Save thedillonb/8209218 to your computer and use it in GitHub Desktop.
How to add value to input area in rails form. Test Moo cow!
This is another file... Cool!
<div class="form-inputs">
<%= f.input :title, :input_html => { :value => "This is title field value." } %>
<%= f.input :body, :input_html => { :value => "This is body field value." } %>
</div>
or
<div class="form-inputs">
<%= f.input :title, input_html: { :value => "This is title field value." } %>
<%= f.input :body, input_html: { :value => "This is body field value." } %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment