Index: trunk/lib/Text/FormBuilder.pm
===================================================================
--- trunk/lib/Text/FormBuilder.pm	(revision 72)
+++ trunk/lib/Text/FormBuilder.pm	(revision 73)
@@ -177,5 +177,12 @@
                         $$field{name} = "$$_[1]{name}_$$field{name}";                
                     }
-                    $_ = [ 'group', { label => $$_[1]{label} || ucfirst(join(' ',split('_',$$_[1]{name}))), group => \@fields } ];
+                    $_ = [
+                        'group',
+                        {
+                            label => $$_[1]{label} || ucfirst(join(' ',split('_',$$_[1]{name}))),
+                            comment => $$_[1]{comment},
+                            group => \@fields,
+                        },
+                    ];
                 }
             }
@@ -526,7 +533,7 @@
                 # mark invalid fields
                 if ($$_{invalid}) {
-                    $OUT .= "<td>$$_{field} $$_{comment} ] . $msg_invalid . q[</td>";
+                    $OUT .= qq[<td>$$_{field} <span class="comment">$$_{comment}</span> ] . $msg_invalid . q[</td>];
                 } else {
-                    $OUT .= qq[<td>$$_{field} $$_{comment}</td>];
+                    $OUT .= qq[<td>$$_{field} <span class="comment">$$_{comment}</span></td>];
                 }
                 
@@ -546,5 +553,5 @@
                 $OUT .= " ] . $msg_invalid . q[" if grep { $$_{invalid} } @group_fields;
                 
-                $OUT .= qq[    </span></td>\n];
+                $OUT .= qq[ <span class="comment">$$line[1]{comment}</span></span></td>\n];
                 $OUT .= qq[  </tr>\n];
             }   
@@ -1180,9 +1187,9 @@
 
 You can also use groups in normal field lines:
-    
+
     birthday|Your birthday:DATE
 
 The only (currently) supported pieces of a fieldspec that may be used with a
-group in this notation are name and label.
+group in this notation are name, label, and hint.
 
 =head2 Comments
@@ -1190,5 +1197,7 @@
     # comment ...
 
-Any line beginning with a C<#> is considered a comment.
+Any line beginning with a C<#> is considered a comment. Comments can also appear
+after any field line. They I<cannot> appear between items in a C<!list>, or on
+the same line as any of the directives.
 
 =head1 TODO
@@ -1207,5 +1216,7 @@
 reset button
 
-Allow comments on group fields (rendered after the all the fields)
+Set FB constructor options directly in the formspec (via a C<!fb> or similar
+directive). The major issue here would be what format to use to allow for
+array/hash refs.
 
 Pieces that wouldn't make sense in a group field: size, row/col, options,
Index: trunk/lib/Text/FormBuilder/grammar
===================================================================
--- trunk/lib/Text/FormBuilder/grammar	(revision 72)
+++ trunk/lib/Text/FormBuilder/grammar	(revision 73)
@@ -152,8 +152,14 @@
 group_name: /%[A-Z_]+/
 
-field_group: name label(?) group_type
-    { 
+field_group: name label(?) hint(?) group_type comment(?)
+    {
+	warn "[$thisline] comment = $item{'hint(?)'}[0]\n" if $item{'hint(?)'}[0];
 	#warn "[$thisline] field $item{name} is $item{group_type}\n";
-	push @lines, [ 'group', { name => $item{name}, label => $item{'label(?)'}[0], group => $item{group_type} } ];
+	push @lines, [ 'group', {
+	    name    => $item{name},
+	    label   => $item{'label(?)'}[0],
+	    comment => $item{'hint(?)'}[0],
+	    group   => $item{group_type},
+	} ];
     }
 
