HTML-FormHandler

 view release on metacpan or  search on metacpan

lib/HTML/FormHandler/Manual/Intro.pod  view on Meta::CPAN

=head2 Process the form

The form's 'process' method should be run on each request, passing in the
request parameters:

    $form->process( params => $c->request->body_parameters,
        action => $action,
    );

If the parameters are not empty, then validation will be performed. The
corollary is that you should not pass in extra parameters when the form
has not been posted. A special 'posted' flag can be used if
the form consists entirely of fields like checkboxes that do not include
names in params if unchecked, and also works to prevent validation from
being performed if there are extra params:

    $form->process( posted => ( $c->req->method eq 'POST' ),
        params => $c->request->parameters, action => $action );

There is an alternative method for processing the form, which is sometimes
preferred for persistent forms. It returns a 'result' object, and clears



( run in 1.264 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )