lib/HTML/FormFu/Element.pm          |    8 ++++++++
 lib/HTML/FormFu/Element/Fieldset.pm |   23 ++++++++++++++++++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/lib/HTML/FormFu/Element.pm b/lib/HTML/FormFu/Element.pm
index 0b66df8..1c77ba8 100644
--- a/lib/HTML/FormFu/Element.pm
+++ b/lib/HTML/FormFu/Element.pm
@@ -229,11 +229,13 @@ HTML::FormFu::Element - Element Base Class
     elements:
       - type: Text
         name: username
+        label: Preferred Username
         constraints:
           - type: Required
       
       - type: Password
         name: password
+        label: Password
         constraints:
           - type: Required
           - type: Equal
@@ -241,6 +243,7 @@ HTML::FormFu::Element - Element Base Class
       
       - type: Password
         name: repeat-password
+        label: Confirm password
       
       - type: Submit
 
@@ -282,6 +285,11 @@ form-field.
 
 This is used by L<HTML::FormFu/get_fields>.
 
+=head2 label
+
+For almost all elements, a label can be specified, which will be displayed
+prior to the element.
+
 =head1 BUILDING AN ELEMENT
 
 =head2 load_config_file
diff --git a/lib/HTML/FormFu/Element/Fieldset.pm b/lib/HTML/FormFu/Element/Fieldset.pm
index 202d006..e522240 100644
--- a/lib/HTML/FormFu/Element/Fieldset.pm
+++ b/lib/HTML/FormFu/Element/Fieldset.pm
@@ -37,12 +37,33 @@ HTML::FormFu::Element::Fieldset - Fieldset element
 
     my $fs = $form->element( Fieldset => 'address' );
 
+    ---
+    elements:
+      - type: Fieldset
+        legend: User Data
+        attributes:
+          class: myCssClass
+        elements:
+          - name: firstname
+            type: Text
+          - name: lastname
+            type: Text
+          - name: password
+            type: Password
+
 =head1 DESCRIPTION
 
-Fieldset element.
+The Fieldset element represents an HTML fieldset tag, and inherits from the
+L<HTML::FormFu::Element::Block> and L<HTML::FormFu::Element> objects.
+Additionally it accepts a legend method which will create a child HTML legend
+tag.
 
 =head1 METHODS
 
+=head2 legend
+
+Setting a legend will create a child HTML legend tag within the fieldset.
+
 =head1 SEE ALSO
 
 Is a sub-class of, and inherits methods from 
-- 
1.6.3.1

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to