perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Mak <>
Subject $Request->{Form}
Date Mon, 10 Feb 2003 09:47:45 GMT
Is it all right to use $Request->{Form}? Directly using this variable
seems to be an undocumented feature, but I found it useful recently:
It makes $Response->{FormFill} more flexible because now rather than
only being able to re-populate the form with data that the user just
entered, I can also re-populate the form from a database record
(useful for editing things in the database).

For example:

my $id = int($Request->Params('id'));
my $submission = $dbh->selectrow_hashref("SELECT * FROM submissions WHERE id = $id");
$Response->{FormFill} = 1;
$Request->{Form} = $submission;
# HTML code for the form goes below

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message