Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add documenation for :input_html

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
commit f26ea50aee37696a926c57b7391e60df23ab29c1 1 parent fa74a40
Greg Fitzgerald authored committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.textile
View
12 README.textile
@@ -156,6 +156,18 @@ If you want to customize the label text, or render some hint text below the fiel
<% end %>
</pre>
+If you want to customize html elements for any non button inputs you just need
+to specify the :input_html options hash.
+
+<pre>
+ <% semantic_form_for @post do |form| %>
+ <%= form.input :title, :input_html => {:size => 60} %>
+ <%= form.input :body %>
+ <%= form.input :created_at, :input_html => {:disabled => true} %>
+ <%= form.buttons %>
+ <% end %>
+</pre>
+
Nested forms (Rails 2.3) are also supported. You can do it in the Rails way:
<pre>
Please sign in to comment.
Something went wrong with that request. Please try again.