Please enable JavaScript.
Coggle requires JavaScript to display documents.
Simple form - Coggle Diagram
Simple form
-
auto generate HTML for us: label, hint, error, input
-
-
-
input_html, hint_html, error_html, label_html: { id: , class: or other attributes}
hint: false, label: false, error:false
simple_form_for ... defaults: { ... } pass the same options , but specific call will be override
-
require field has *, :presence validation
-
-
-
-
f.label, f.hint, f.error, f.full_error, f.input_field
-
check box, radio :boolean_style => :inline, :nested
- gem 'simple_form'
- bundle
- rails g simple_form:install [--bootstrap]
f.input :age, collection: 18..60
-
use :select by default
can change to :radio_buttons, :check_boxes
:label_method(#to_label), :value_method
-
-
-