<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -95,6 +95,22 @@ Another convenient thing about the form assistant is the ability to control labe
 
 That works for all form helpers (text_area, check_box, etc). And by default, the label will be the humanized version of the field name, so that's what you'll get if you ignore the label options altogether.
 
+h3. Form Widgets
+
+Sometimes, a single form field isn't enough.  Form assistant provides a construct to help you
+with this, called widget:
+
+&lt;pre&gt;&lt;code&gt;&lt;% form.widget :expiration_date, :label =&gt; 'Card expiration date' do %&gt;
+  &lt;%= form.select :expiration_month, (1..12) %&gt;
+  &lt;%= form.select :expiration_month, (1..12) %&gt;
+&lt;% end %&gt;&lt;/code&gt;&lt;/pre&gt;
+
+There are a few things to note about this new feature:
+
+  * error messages will come from the errors on the field name ('expiration_date' in the above example)
+  * templates and labels are disabled for the duration of the block
+  * the default template for widgets is the fallback template (===_field.html.erb=== unless configured otherwise)
+
 h3. Custom Helpers
 
 The form assistant provides a #cancel() helper that will allow the user to go back to the previous screen, automatically.</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -136,7 +136,7 @@ module RPH
         # consider the global setting for labels and
         # allow for turning labels off on a per-helper basis
         # &lt;%= form.text_field :title, :label =&gt; false %&gt;
-        if self.class.ignore_labels || options[:label] === false
+        if self.class.ignore_labels || options[:label] === false || field.blank?
           label_options[:label] = false
         else  
           # ensure that the :label option is a Hash from this point on
@@ -190,8 +190,9 @@ module RPH
         result
       end
     
-      def widget(field, *args, &amp;block)
+      def widget(*args, &amp;block)
         options          = args.extract_options!
+        field            = args.shift || nil 
         label_options    = extract_options_for_label(field, options)
         template_options = extract_options_for_template(self.fallback_template, options)
         label            = label_options[:label] === false ? nil : self.label(field, label_options.delete(:text), label_options)
@@ -202,7 +203,8 @@ module RPH
           @template.capture(&amp;block)
         end  
         
-        render_partial_for(element, field, label, tip, template_options[:template], 'widget', required, args)
+        partial = render_partial_for(element, field, label, tip, template_options[:template], 'widget', required, args)
+        RPH::FormAssistant::Rules.binding_required? ? @template.concat(partial, block.binding) : @template.concat(partial)
       end
       
       # redefining all traditional form helpers so that they</diff>
      <filename>lib/form_assistant.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b02e211452d2d7908f0a4f7ea813d56fa63aeae3</id>
    </parent>
  </parents>
  <author>
    <name>Chris Scharf</name>
    <email>scharfie@gmail.com</email>
  </author>
  <url>http://github.com/rpheath/form_assistant/commit/8d95b733e7457f071db88f1fabe94e3fd3272b34</url>
  <id>8d95b733e7457f071db88f1fabe94e3fd3272b34</id>
  <committed-date>2009-03-24T09:24:05-07:00</committed-date>
  <authored-date>2009-03-06T08:40:38-08:00</authored-date>
  <message>Updated README

Signed-off-by: Ryan Heath &lt;rpheath@gmail.com&gt;</message>
  <tree>c4c441aa6d2b8083e56c1e6c207c26caa51c06fa</tree>
  <committer>
    <name>Ryan Heath</name>
    <email>rpheath@gmail.com</email>
  </committer>
</commit>
