At Wed, 10 Apr 2002 10:59:48 -0400, Perrin Harkins wrote: > Another approach is to generate the HTML and then run it through an > existing HTML rewriter like HTML::FillInForm. That's pretty easy, and > probably the quickest way to get where you want to be.
This lets me write a tiny plugin rewriter: http://bulknews.net/lib/archives/Template-Plugin-FillInForm-0.01.tar.gz In fact this plugin is handier than using HTML::FillInForm directly, cause Template FILTER syntax allows you to filter multiple forms in a HTML with different queries. =head1 NAME Template::Plugin::FillInForm - TT plugin for HTML::FillInForm =head1 SYNOPSIS use Template; use Apache; use Apache::Request; my $apr = Apache::Request->new(Apache->request); # or CGI.pm will do my $template = Template->new( ... ); $template->process($filename, { apr => $apr }); # in your template [% USE FillInForm %] [% FILTER fillinform fobject => apr %] <!-- this form becomes sticky --> <form action="foo" method="POST"> <input type="text" name="foo"> <input type="hidden" name="bar"> <input type="radio" name="baz" value="foo"> <input type="radio" name="baz" value="bar"> </form> [% END %] =head1 DESCRIPTION Template::Plugin::FillInForm is a plugin for TT, which allows you to make your HTML form sticky using HTML::FillInForm. =head1 AUTHOR Tatsuhiko Miyagawa E<lt>[EMAIL PROTECTED]<gt> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L<Template>, L<HTML::FillInForm> =cut
