Created
June 15, 2013 13:15
-
-
Save TXDynamics/5788093 to your computer and use it in GitHub Desktop.
Simple_form Quick Reference Bootstrap Views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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