=head1 NAME HTML::FormHandler::Manual::Templates - using templates =head1 SYNOPSIS Documentation on templates to use with L
    In progress...

    =head1 Using templates

    There are lots of different ways to set up templates. One way is to
    create a 'widget' directory, and store template snippets there.

    You can use the default 'widget' for the field class, or set the 'widget'
    for the field in your form:

       fields => [
          my_special_field => {
             type => 'Text',
             widget => 'my_special_widget',
          },
          my_second_field => {
             type => 'Text',
             widget => 'yet_another_widget',
          },
       ]

    And include them in a generic template:

       [% PROCESS widget/form_start.tt %]

       [% FOREACH f IN form.sorted_fields %]
          [% PROCESS widget/${f.widget}.tt %]
       [% END %]

       [% PROCESS widget/form_end.tt %]

    =head1 Sample templates

    =head2 Text input field with error class on div & error messages
[% IF f.has_errors %] [% FOR error IN f.errors %]

[% error %]

[% END %] [% END %] [% f.label %]
=head2 Select field Single select: [% f.label %]
Multiple select: [% f.label || f.name %]
=head2 Checkbox =head1 AUTHOR Gerda Shank, gshank@cpan.org =head1 COPYRIGHT This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =cut