<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,6 +33,7 @@ module SemanticFormBuilder
         content_tag(:label , &quot;#{options.delete(:label)}:&quot;, :for =&gt; options[:id])
       end
       
+      options[:class] = append_class_name(options[:class], 'file')
       html &lt;&lt; content_tag(:dd) do
         @super.file_field_tag(name, options)
       end
@@ -46,6 +47,7 @@ module SemanticFormBuilder
         content_tag(:label , &quot;#{options.delete(:label)}:&quot;, :for =&gt; options[:id])
       end
 
+      options[:class] = append_class_name(options[:class], 'checkbox')
       html &lt;&lt; content_tag(:dd) do
         checked = options.delete(:value).to_s != 'false'
         @super.check_box_tag(name, &quot;1&quot;, checked, options) +
@@ -77,6 +79,7 @@ module SemanticFormBuilder
     # ex: f.submit_tag &quot;Caption&quot;
     #
     def submit_tag(label, options={})
+      options[:class] = append_class_name(options[:class], 'submit')
       content_tag(:dd, :class =&gt; 'button') do
         @super.submit_tag(label, options)
       end
@@ -89,6 +92,7 @@ module SemanticFormBuilder
     # ex: f.image_submit_tag 'some_image.png'
     #    
     def image_submit_tag(image_file, options={})
+      options[:class] = append_class_name(options[:class], 'submit')
       content_tag(:dd, :class =&gt; 'button') do
         @super.image_submit_tag(image_file, options)
       end
@@ -145,9 +149,9 @@ module SemanticFormBuilder
     # 
     def field_tag_item_options(element_name, input_type, options)
       result_options = (options || {}).dup
-      result_options.reverse_merge!(:value =&gt; nil, :class =&gt; '', :id =&gt; element_name)
+      result_options.reverse_merge!(:value =&gt; nil, :id =&gt; element_name)
       result_options[:label]  ||= element_name.to_s.titleize
-      result_options[:class]  &lt;&lt; &quot; #{input_type_to_class(input_type)}&quot;
+      result_options[:class]  = append_class_name(options[:class], input_type_to_class(input_type))
       result_options
     end
     
@@ -159,10 +163,13 @@ module SemanticFormBuilder
 
     # returns the class name based on input type
     def input_type_to_class(input_type)
-      class_mappings = { :text_field =&gt; 'text', :radio_button =&gt; 'radio', :password_field =&gt; 'text', 
-        :submit =&gt; 'submit', :image_submit =&gt; 'submit', :hidden_field =&gt; 'hidden', 
-        :file_field =&gt; 'file', :check_box =&gt; 'checkbox'  }
-      class_mappings[input_type.to_sym] || input_type
+      class_mappings = { :text_field =&gt; 'text', :password_field =&gt; 'text' }
+      class_mappings[input_type.to_sym] || nil
+    end
+    
+    # returns the result of appending the old classname to the new
+    def append_class_name(original_value, new_value)
+      (original_value || &quot;&quot;) &lt;&lt; &quot; #{new_name}&quot;
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/semantic_fields_renderer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d9a73f652f599b0056609f2875874ebd9e7f275b</id>
    </parent>
  </parents>
  <author>
    <name>Nathan Esquenazi</name>
    <email>nesquena@gmail.com</email>
  </author>
  <url>http://github.com/nesquena/semantic_form_builder/commit/1742077215b9d5453da478a9b9b0a1b2d849fbd0</url>
  <id>1742077215b9d5453da478a9b9b0a1b2d849fbd0</id>
  <committed-date>2009-01-07T15:09:03-08:00</committed-date>
  <authored-date>2009-01-07T15:09:03-08:00</authored-date>
  <message>Each type of input now displays its name properly as a class</message>
  <tree>6f45f7a3e7554bc1ac41ac48a96a1473bae74df1</tree>
  <committer>
    <name>Nathan Esquenazi</name>
    <email>nesquena@gmail.com</email>
  </committer>
</commit>
