mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-21 10:37:53 -04:00
25 lines
1.4 KiB
Plaintext
25 lines
1.4 KiB
Plaintext
The goal of CGI::FormBuilder is to provide an easy way to generate and
|
|
process CGI form-based applications. It is designed to be smart in that
|
|
it figures a lot of stuff out for you. As a result, FormBuilder gives
|
|
about a 4:1 ratio of the code it generates versus what you have to write.
|
|
|
|
For example, if you have multiple values for a field, it sticks them
|
|
in a radio, checkbox, or select group, depending on some factors. It
|
|
will also automatically name fields for you in human-readable labels
|
|
depending on the field names, and lay everything out in a nicely
|
|
formatted table. It will even title the form based on the name of the
|
|
script itself (order_form.cgi becomes "Order Form").
|
|
|
|
Plus, FormBuilder provides you full-blown validation for your fields,
|
|
including some useful builtin patterns. It will even generate
|
|
JavaScript validation routines on the fly! And, of course, it
|
|
maintains state ("stickiness") across submissions, with hooks provided
|
|
for you to plugin your own sessionid module such as Apache::Session.
|
|
|
|
And though it's smart, it allows you to customize it as well. For
|
|
example, if you really want something to be a checkbox, you can make
|
|
it a checkbox. And, if you really want something to be output a
|
|
specific way, you can even specify the name of an HTML::Template or
|
|
Template Toolkit (Template) compatible template which will be
|
|
automatically filled in, statefully.
|