The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 3.03

  • Subclassable Fields Each field is now rendered by its own class, named for the field type. For example, text fields are rendered by "CGI::FormBuilder::Field::text". This allows you to create custom field types and plugging them in by creating your own "CGI::FormBuilder::Field::whatever_you_want" module. Thanks to Peter Eichman for his contributions to this scheme.
  • Messages Localization All messages are now handled in a similar way to field types: They are delegated to "CGI::FormBuilder::Messages::locale" where "locale" is the appropriate string such as "en_US" or "da_DK". A number of localizations are included as part of the standard distribution.
    • There are two ways to use these messages: Either the 'auto' messages mode or by specifying a specific locale:
      • my $form = CGI::FormBuilder->new(messages => 'auto'); # check client my $form = CGI::FormBuilder->new(messages => ':da_DK'); # specified
    • You can create your own messages by copying "_example.pm" and modifying it for your language. When using messages in this way, the HTTP Charset is changed to "utf-8".
  • Select optgroup support By using the "field()" option "optgroups", you can now cause select fields to automatically generate optgroup tags:
    • $form->field(name => 'browser', options => \@opt, optgroups => 1);
    • See the documentation on "optgroups" for more details.
  • Data::FormValidator Support Thanks to another great patch from Peter Eichman, "Data::FormValidator" is supported as a validation option to "new()", just by passing it in as an object. See the documentation on "validate" for more information.
  • Option sorting by LABELNAME or LABELNUM You can now sort options by "LABELNAME" or "LABELNUM", similar to the value-based sorting of "NAME" and "NUM". See the documentation for more details.
  • XHTML Compliance Generated code now validates against <http://validator.w3.org>. This includes stuff like lowercase "get" and "post" methods, lowercase "onchange" and "onsubmit" actions, and so on.

Documentation

Changes in FormBuilder 3.0, please also see the README
how to install FormBuilder 3.0
README for FormBuilder 3.0, please also see Changes

Modules

Easily generate and process stateful forms
Base class for FormBuilder fields
FormBuilder class for button fields
FormBuilder class for checkbox fields
FormBuilder class for file fields
FormBuilder class for hidden fields
FormBuilder class for image fields
FormBuilder class for password fields
FormBuilder class for radio fields
FormBuilder class for select fields
FormBuilder class for static fields
FormBuilder class for text fields
FormBuilder class for textarea fields
Localized message support for FormBuilder
English (default) messages for FormBuilder
__LANG__ messages for FormBuilder
Danish messages for FormBuilder
Danish messages for FormBuilder
German messages for FormBuilder
German messages for FormBuilder
English (default) messages for FormBuilder
English (default) messages for FormBuilder
English (default) messages for FormBuilder
es_ES messages for FormBuilder
es_ES messages for FormBuilder
French messages for FormBuilder
French messages for FormBuilder
Japanese messages for FormBuilder
Japanese messages for FormBuilder
Norwegian messages for FormBuilder
Norwegian messages for FormBuilder
Create multi-page FormBuilder forms
Source adapters for FormBuilder
Initialize FormBuilder from external file
Template adapters for FormBuilder
FormBuilder interface to CGI::FastTemplate
FormBuilder interface to HTML::Template
FormBuilder interface to Template Toolkit
FormBuilder interface to Text::Template
Test harness for FormBuilder
Utility functions for FormBuilder