Jeff Stuart wrote:
> Small rant here. :) Ok Peter, this looks interesting. WHAT does it
> do???? :) And please, to ALL module developers, when you post an
> announcement, even if it's an upgrade, please include a brief description of
> what the module does. :) Your module may JUST be the thing that I'm looking
> for but if there's no description of what it does I may not know that. :)
Ack, oops!
OK, HTML::StickyForms provides a consistent interface for CGI and mod_perl
programs to generate HTML forms with "sticky" values. This is much like what
CGI.pm does, but with a much smaller remit.
The interface is pretty straightforward:
sub handler{
my($r)=@_;
$r=Apache::Request->new($r);
my $f=HTML::StickyForms->new($r);
$r->send_http_header;
print
"<HTML><BODY><FORM>",
"Field 1:",
$f->text(name => field1, value => "default value"),
"<BR>Radio buttons:",
$f->radio_group(name => field2, values => [1,2,3],
labels => {1=>'one', 2=>'two', 3=>'three'}, default => 3),
"</FORM></BODY></HTML>",
;
return OK;
}
The argument to new() can be one of: an Apache::Request (or subclass) instance,
a CGI (or subclass) instance (CGI 2.x, 3.x), a CGI::State (or subclass)
instance (CGI 3.x), or you can leave it out completely, in which case, there
won't be any sticky values.
This will all get documented very soon, and I promise to at least hint at it in
the next release announcement.
--
Peter Haworth [EMAIL PROTECTED]
"People get annoyed when you try to debug them"
-- Larry Wall