NAME

CGI::Form::Table - create a table of form inputs

VERSION

version 0.01

$Id: Table.pm,v 1.2 2004/10/04 19:43:33 rjbs Exp $

SYNOPSIS

use CGI::Form::Table;

my $form = CGI::Form::Table->new(columns => [qw(lname fname job age)]);

print $form->as_html;

DESCRIPTION

This module simplifies the creation of an HTML table containing form inputs. The table can be extended to include extra rows, and these rows can be removed. Each has a unique name, and on form submission the inputs are effectively serialized.

CGI::Form::Table::Reader will use the CGI module to produce a data structure based on the parameters submitted by a form of this type.

METHODS

CGI::Form::Table->new(%arg)

This method constructs a new form. The only required arguments are columns, which names the columns that will be in the form table, and prefix, which gives the unique prefix for input fields.

If given, initial_rows specifies how many rows should initially be in the form.

CGI::Form::Table->as_html

This returns HTML representing the form object. JavaScript is included to make the form expandible/shrinkable. ("SEE ALSO")

javascript

This method returns JavaScript that will make the handlers for the HTML buttons work. Currently this code is known to work in MSIE and Firefox, but not Safari or Omniweb. (Patches welcome.)

SEE ALSO

AUTHOR

Ricardo SIGNES, <rjbs@cpan.org>

BUGS

Please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT

Copyright 2004 Ricardo SIGNES, All Rights Reserved.

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