Perl Form Builder ::Features ::Download ::Tutorial ::Examples
::Documentation ::FormBuilder Google Group ::Old List Archives ::Contribute
Note: The mailing list is has been replaced by the Google FormBuilder Group
Welcome to, the official website for the Perl CGI Form Builder module, aka FormBuilder!

What is FormBuilder?

FormBuilder is an extremely fast, reliable form generation and processing module written by Nate Wiger, with numerous other contributors. Make sure you read through the tutorial and join the users mailing list to learn more about FormBuilder.


09/17/2011 - FormBuilder 3.08 released Refresh release with a couple new features: support for "charset: utf8" in Source::File, add_before_option/add_after_option c/o Victor Porton, and support for HTML5 field types c/o Wolfgang Radke. (3.08 Release Notes). Download FormBuilder 3.08.

03/01/2007 - FormBuilder 3.0501 released An important update that fixes a memory leak affecting Catalyst users (3.0501 Release Notes). Download FormBuilder 3.0501.

12/18/2006 - FormBuilder 3.05 released! Fieldsets, Catalyst support, table-free <div> rendering (3.05 Release Notes). Happy Holidays - enjoy. Download FormBuilder 3.05.

08/31/2006 - FormBuilder 3.04 released! Several new features (3.04 Release Notes), including the inflate option to turn fields into objects on the fly, and a new prepare() method to give you complete access to FormBuilder's rendering hash, for easier integration with Catalyst. Download FormBuilder 3.04.

08/16/2006 - Catalyst FormBuilder plugin released! A new plugin adds support for FormBuilder to Catalyst. Download the plugin here. If you haven't checked out Catalyst, you should - it's a real contender to Ruby on Rails.

05/20/2006 - FormBuilder 3.0302 released! This is a bugfix release over 3.03 that mainly addresses UTF8 issues. Download FormBuilder 3.0302.

03/06/2006 - FormBuilder 3.03 released! After a long wait, FormBuilder 3.03 is here.
Check it out! There's tons of new features in the 3.03 Release Notes, including:

  • Messages localization, including packaged messages for many languages
  • Subclassable fields
  • Data::FormValidator support for validation (thanks Peter Eichman!)
  • Select field optgroup support
  • Option sorting by LABELNAME or LABELNUM
  • Many bugfixes

04/29/2005 - FormBuilder 3.0202 is out! Download 3.0202 here.
This is a bugfix release over the 3.02 version that came out on 04/18 with the following gooey goodness.

  • Multi-page form support
  • Per-field "other" and "growable" options
  • Autoloadable $field() subs (via fieldsubs option)
  • Ability to initialize FB from external config files
  • Addition of CGI::FastTemplate template engine
  • Character encoding dispatched to HTML::Entities
  • Easy plug-in support for CGI::Session
  • Truly subclassable template and messaging modules
  • Completely compliant XHTML output (validated)
For more info, read the 3.0202 Release Notes.

The last version of FormBuilder in the 2.x tree is 2.14 (release notes). This version is very stable, although there are a few obscure edge-cases bugs. It works back to Perl 5.004, whereas Perl 5.6.0 or later is needed for the 3.x series.


Do you hate generating, processing, and validating CGI forms? Do you love Perl? FormBuilder is the answer. It's an extremely fast, robust Perl module with a ridiculous set of features. With FormBuilder, you can build an entire form application with nothing more than this:


use CGI::FormBuilder;

@fields = qw(first_name last_name email phone mailing_list);

$form = CGI::FormBuilder->new(
             method => 'post',
             fields => \@fields,
             validate => {
                email => 'EMAIL',    # validate fields using
                phone => 'PHONE',    # built-in patterns
             required => 'ALL',

# add options to our mailing list field 
$form->field(name => 'mailing_list',
             options => [qw/Subscribe Unsubscribe/]);

if ($form->submitted) {
    # you would write code here to act on the form data
    $fname = $form->field('first_name');
    $lname = $form->field('last_name');

    print $form->confirm(header => 1);
} else {
    print $form->render(header => 1);
The resultant application is quite impressive, including HTML form generation, JavaScript validation code, Perl regex checks, automatic CGI "stickiness", and more. You can see it in action, and view the HTML generated.
FormBuilder is © Nate Wiger, with contributions from many people.