74af1d22d3
collection. The goal of CGI::FormBuilder (FormBuilder) is to provide an easy way for you to generate and process CGI form-based applications. This module is designed to be smart in that it figures a lot of stuff out for you. As a result, FormBuilder gives you 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.
25 lines
1.4 KiB
Text
25 lines
1.4 KiB
Text
The goal of CGI::FormBuilder (FormBuilder) is to provide an easy way
|
|
for you to generate and process CGI form-based applications. This
|
|
module is designed to be smart in that it figures a lot of stuff out
|
|
for you. As a result, FormBuilder gives you 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.
|