<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,3 @@
 .DS_Store
 coverage
+*~</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -8,25 +8,25 @@ Hacked together forms were easy, but awesome forms with decent semantics, rich m
 
 &lt;pre&gt;
   &lt;% semantic_form_for @article do |form| %&gt;
-  
+
     &lt;% form.inputs :name =&gt; &quot;Basic&quot; do %&gt;
-      &lt;%= form.input :title %&gt;                               
-      &lt;%= form.input :body %&gt;                                
-      &lt;%= form.input :section_id %&gt;                          
-      &lt;%= form.input :publication_state_id, :as =&gt; :radio %&gt; 
-      &lt;%= form.input :author_id, :as =&gt; :select %&gt;                           
-      &lt;%= form.input :allow_comments, :label =&gt; &quot;Allow commenting on this article&quot; %&gt;                      
-    &lt;% end %&gt;                                                
-  
+      &lt;%= form.input :title %&gt;
+      &lt;%= form.input :body %&gt;
+      &lt;%= form.input :section_id %&gt;
+      &lt;%= form.input :publication_state_id, :as =&gt; :radio %&gt;
+      &lt;%= form.input :author_id, :as =&gt; :select %&gt;
+      &lt;%= form.input :allow_comments, :label =&gt; &quot;Allow commenting on this article&quot; %&gt;
+    &lt;% end %&gt;
+
     &lt;% form.inputs :name =&gt; &quot;Advanced&quot; do %&gt;
-      &lt;%= form.input :keywords, :required =&gt; false, :hint =&gt; &quot;Example: ruby, rails, forms&quot; %&gt;        
+      &lt;%= form.input :keywords, :required =&gt; false, :hint =&gt; &quot;Example: ruby, rails, forms&quot; %&gt;
       &lt;%= form.input :extract, :required =&gt; false %&gt;
       &lt;%= form.input :description, :required =&gt; false %&gt;
-      &lt;%= form.input :url_title, :required =&gt; false %&gt;                           
+      &lt;%= form.input :url_title, :required =&gt; false %&gt;
     &lt;% end %&gt;
 
-    &lt;% form.buttons do %&gt;                                    
-      &lt;%= form.commit_button %&gt;                             
+    &lt;% form.buttons do %&gt;
+      &lt;%= form.commit_button %&gt;
     &lt;% end %&gt;
 
   &lt;% end %&gt;
@@ -191,6 +191,50 @@ You don't even have to specify the field list (Formtastic will simply render and
 
 Pretty soon we won't have to write any code at all ;)
 
+h2. Extending Formtastic
+
+Adding functionality to Formtastic can be done by extending SemanticFormHelper.
+
+&lt;pre&gt;
+module JustinFrench #:nodoc:
+  module Formtastic #:nodoc:
+    class FancySemanticFormBuilder &lt; SemanticFormBuilder
+
+      # new method to be added allowing full control over the label and value
+      def label_and_value(label_text, value, options = {})
+        options[:label] = label_text
+        content = text_label(label_text, options)
+        content += @template.content_tag(:span, value)
+        @template.content_tag(:li, content)
+      end
+    end
+  end
+end
+&lt;/pre&gt;
+
+To use this builder specify the builder name when defining the form.
+
+&lt;pre&gt;
+  form_for(@post, :builder =&gt; JustinFrench::Formtastic::FancySemanticFormBuilder))
+&lt;/pre&gt;
+
+The extended form builder can be placed in the RAILS_ROOT/lib directory and can be required in a Rails initializer.
+
+If you want to make the extended form builder the default for the semantic_form_* methods then the SemanticFormBuilder can overridden to specify a new semantic_form_builder.
+
+&lt;pre&gt;
+module JustinFrench #:nodoc:
+  module Formtastic #:nodoc:
+    module TextEnabledSemanticFormHelper
+      def semantic_form_builder
+        JustinFrench::Formtastic::TextEnabledSemanticFormBuilder
+      end
+    end
+  end
+end
+
+ActionView::Base.send :include, JustinFrench::Formtastic::TextEnabledSemanticFormHelper
+&lt;/pre&gt;
 
 h2. Conventions &amp; Prerequisites
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -42,10 +42,10 @@ module JustinFrench #:nodoc:
     # has too many dependencies on an ActiveRecord object being present.
     module SemanticFormHelper
       [:form_for, :fields_for, :form_remote_for, :remote_form_for].each do |meth|
-        src = &lt;&lt;-END_SRC   
+        src = &lt;&lt;-END_SRC
           def semantic_#{meth}(record_or_name_or_array, *args, &amp;proc)
             options = args.extract_options!
-            options[:builder] =  JustinFrench::Formtastic::SemanticFormBuilder
+            options[:builder] = semantic_form_builder
             options[:html] ||= {}
 
             class_names = options[:html][:class] ? options[:html][:class].split(&quot; &quot;) : []
@@ -59,11 +59,15 @@ module JustinFrench #:nodoc:
 
             #{meth}(record_or_name_or_array, *(args &lt;&lt; options), &amp;proc)
           end
+
+          def semantic_form_builder
+            JustinFrench::Formtastic::SemanticFormBuilder
+          end
         END_SRC
         module_eval src, __FILE__, __LINE__
       end
     end
-    
+
     class SemanticFormBuilder &lt; ActionView::Helpers::FormBuilder
       
       DEFAULT_TEXT_FIELD_SIZE = 50</diff>
      <filename>lib/justin_french/formtastic.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a8f1644c3f3498471ad48004adf3fa0820f656a6</id>
    </parent>
  </parents>
  <author>
    <name>Mark Mansour</name>
    <email>mark@stateofflux.com</email>
  </author>
  <url>http://github.com/freelancing-god/formtastic/commit/353618ed0da9982abcb8371846f2eb076bd4efa2</url>
  <id>353618ed0da9982abcb8371846f2eb076bd4efa2</id>
  <committed-date>2009-01-14T12:47:23-08:00</committed-date>
  <authored-date>2009-01-13T04:19:13-08:00</authored-date>
  <message>Extending Formtastic can be done by overriding the semantic_form_builder method

Signed-off-by: Justin French &lt;justin@indent.com.au&gt;</message>
  <tree>374449a039e3c23814c7abaf2aca1e5925561de1</tree>
  <committer>
    <name>Justin French</name>
    <email>justin@indent.com.au</email>
  </committer>
</commit>
