Have you looked at CGI::FormBuilder?
#!/usr/bin/perl -wT use CGI::FormBuilder; # Fields to create/label/read my @fields = qw/name email password confirm_password zipcode/; # Required fields (labels will be shown in bold) my @req = @fields[0..3]; # Do it! my $form = CGI::FormBuilder->new(method => 'post', fields => \@fields, + required => \@req); # Validate via JavaScript, etc.; process if ($form->submitted) { my $field = $form->fields; # update_db($field->fields}; # This is where you'd update the dat +abase, etc. print $form->confirm(header => 1); } else { print $form->render(header => 1); }
-- Human history becomes more and more a race between education and catastrophe. -- HG Wells
In reply to Re: Is this attempt at a generic form using CGI really silly/inefficient/useless waste of time?
by oko1
in thread Is this attempt at a generic form using CGI really silly/inefficient/useless waste of time?
by LesleyB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |