Hi Jeff,
Great question and congrats on picking up ValidateRM - it's one of the great modules out there. :)
What I usually do to piggyback on that whole setup is something like this:
# if we got to this point, we have valid input, so we should insert it. my $bookid = _bookPool_do($q->param('bookid'), yada yada); if (!$bookid) { return $self->bookPool( { 'db_error' => 1 } ); } else { # return success }
You see, since you updated your bookPool function to handle the $errs parameter, then you can use that to also pass in your own errors. Then in your template file, display something if 'db_error' exists.
This doesn't answer the question of how to duplicate the sticky form behavior of ValidateRM. He'd still have to use HTML::FillInForm. So something like:
# if we got to this point, we have valid input, so we should insert it.
my $bookid = _bookPool_do($q->param('bookid'), yada yada);
if (!$bookid) {
my $error_page = $self->bookPool( { 'db_error' => 1 } );
my $fif = HTML::FillInForm->new();
return $fif->fill(
scalarref => \$error_page,
fobject => $self->query
);
} else {
# return success
}-- Michael Peters Developer Plus Three, LP
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
