HTML-FormHandler

 view release on metacpan or  search on metacpan

lib/HTML/FormHandler/Manual/Templates.pod  view on Meta::CPAN

    [% END -%]

    [% BLOCK select -%]
    <select name="[% f.html_name %]" id="[% f.id %]"[% process_attrs(f.attributes) %]
      [% IF f.multiple %] multiple="multiple" size="[% f.size %]" [% END -%]>
      [% FOR option IN f.options -%]
      <option id="[% f.id %].[% loop.index %]" value="[% option.value -%]"
          [% FOREACH selval IN f.fif -%]
            [% IF selval == option.value %] selected="selected"[% END -%]
          [% END -%]>
          [% option.label | html %]
      </option>
      [% END -%]
    </select>
    [% END -%]

    [% BLOCK submit -%]
    <input type="submit" name="[% f.html_name %]" id="[% f.id %]"
        [% process_attrs(f.attributes) %] value="[% f.value %]" />
    [% END -%]

    [% BLOCK text -%]
    <input type="[% f.input_type %]" name="[% f.html_name %]" id="[% f.id %]"
       [% process_attrs(f.attributes) %] value="[% f.fif %]" />
    [% END -%]

    [% BLOCK textarea -%]
    <textarea name="[% f.html_name %]" id="[% f.id %]" rows="[% f.rows %]"
       cols="[% f.cols %]" [% process_attrs(f.attributes) %]>[% f.fif %]</textarea>
    [% END -%]

    [% BLOCK upload -%]
    <input type="file" name="[% f.html_name %]" id="[% f.html_name %]"
        [% process_attrs(f.attributes) %] />
    [% END -%]

    [% BLOCK wrapper_simple -%]
    <div[% process_attrs(f.wrapper_attributes) -%]>
      [% IF f.do_label %][% PROCESS label %][% END -%]
      [% content -%]
    </div>
    [% END -%]

    [% BLOCK label -%]
    <label [% process_attrs(f.label_attributes) %]for="[% f.html_name %]">[% f.label %]</label>
    [% END -%]

    [% BLOCK wrapper_wrap_label -%]
    <div[% process_attrs(f.wrapper_attributes) %]>
        <label[% process_attrs(f.label_attributes) %] for="[% f.html_name %]">
           [%~ content ~%][%~ f.label %]
        </label>
    </div>
    [% END -%]

    [% BLOCK wrapper_none -%]
    [% content %]
    [% END -%]

    [% BLOCK wrapper_fieldset -%]
    <fieldset[% process_attrs(f.wrapper_attributes)%]><legend>[% f.label %]</legend>
    [% content -%]
    </fieldset>
    [% END -%]

=head1 AUTHOR

FormHandler Contributors - see HTML::FormHandler

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Gerda Shank.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 1.899 second using v1.01-cache-2.11-cpan-39bf76dae61 )