CGI-FormBuilder
view release on metacpan or search on metacpan
lib/CGI/FormBuilder.pod view on Meta::CPAN
my $form = CGI::FormBuilder->new(... sticky => 0);
By turning off the C<sticky> option, you will still be able to access
the values, but they won't show up in the form.
=head2 I can't get "validate" to accept my regular expressions!
You're probably not specifying them within single quotes. See the
section on C<validate> above.
=head2 Can FormBuilder handle file uploads?
It sure can, and it's really easy too. Just change the C<enctype>
as an option to C<new()>:
use CGI::FormBuilder;
my $form = CGI::FormBuilder->new(
enctype => 'multipart/form-data',
method => 'post',
fields => [qw(filename)]
);
lib/CGI/FormBuilder.pod view on Meta::CPAN
while (<$file>) {
print F;
}
close F;
print $form->confirm(header => 1);
} else {
print $form->render(header => 1);
}
In fact, that's a whole file upload program right there.
=head1 REFERENCES
This really doesn't belong here, but unfortunately many people are
confused by references in Perl. Don't be - they're not that tricky.
When you take a reference, you're basically turning something into
a scalar value. Sort of. You have to do this if you want to pass
arrays intact into functions in Perl 5.
A reference is taken by preceding the variable with a backslash (\).
( run in 2.411 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )