From e1e593825368ea65f32cf6db9d5c9de7c5c67e12 Mon Sep 17 00:00:00 2001 From: jgeiger Date: Tue, 5 Oct 2010 04:06:16 +0800 Subject: [PATCH] Show that you can set the value of the input --- README.rdoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.rdoc b/README.rdoc index 99dde908..7670e089 100644 --- a/README.rdoc +++ b/README.rdoc @@ -59,6 +59,15 @@ You can also disable labels, hints or error or configure the html of any of them <%= f.button :submit %> <% 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: <%= simple_form_for @user do |f| %>