Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save TXDynamics/5788093 to your computer and use it in GitHub Desktop.

Select an option

Save TXDynamics/5788093 to your computer and use it in GitHub Desktop.
Simple_form Quick Reference Bootstrap Views
# standard input with with defined by span and a stylized hint and defined Lable
<%= f.input :listing_title, hint: '<strong>Pick a descriptive title to really sell your place!</strong>', input_html: { class: 'span7' }, label: 'Listing Title' %>
# Standard Input complete defaults pulled from the associated model
<%= f.input :listing_title %>
# Submit Button with modified bootstrap style and Text
<%= f.button :submit , :class => 'btn btn-medium btn-success', value: 'Post It!' %>
# Dynamic Dropdown Select Box using values from a model
<%= f.input :field, collection: @results, label_method: :column_name, value_method: :id_column, prompt: 'Choose Template' %>
# Static select drop down box with a range of numbers
<%= f.input :age, collection: 18..60 %>
# A hidden field with a defined value
<%= f.hidden_field :country_id, value: '236' %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment