Show that you can set the value of the input
This commit is contained in:
parent
ee18e270a1
commit
e1e5938253
|
@ -59,6 +59,15 @@ You can also disable labels, hints or error or configure the html of any of them
|
||||||
<%= f.button :submit %>
|
<%= f.button :submit %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
You can set a default value on an input using the input_html option:
|
||||||
|
|
||||||
|
<%= simple_form_for @user do |f| %>
|
||||||
|
<%= f.input :username %>
|
||||||
|
<%= f.input :password %>
|
||||||
|
<%= f.input :remember_me, :as => :hidden, :input_html => {:value => '1'} %>
|
||||||
|
<%= f.button :submit %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
By default all inputs are required, which means an * is prepended to the label, but you can disable it in any input you want:
|
By default all inputs are required, which means an * is prepended to the label, but you can disable it in any input you want:
|
||||||
|
|
||||||
<%= simple_form_for @user do |f| %>
|
<%= simple_form_for @user do |f| %>
|
Loading…
Reference in New Issue