On 26-Apr-2002 Paul Lindner wrote:
> On Fri, Apr 26, 2002 at 04:15:52PM +0200, F.Xavier Noria wrote:
>> I am writing some modules that receive a form, process it, and return a
>> page that includes that very form. Is there a standard way to fill that
>> returned form so the user sees the same data he sent there, as CGI.pm
>> does?
>> 
> Check out HTML::FillInForm, it's great!  It has code that takes your
> form variables and the raw HTML and adds the default values to the
> form elements.  Very handy.  Here's some code from the documentation:

> Note that HTML::FillInForm is directly supported in Apache::ASP.
> Other toolkits may support it as well.

Embperl's automatic form fill is one of the main reasons I use it. Without a
single line of perl, forms will automatically get filled in, using GET and POST
arguments that were sent. Any left overs that are not used in the form, can be
added as hidden values by inserting [$ hidden $].

Hmmm... you could probably send your raw HTML, once HTML::Template is done
processing the template, through Embperl::Execute, but that's probably
overkill. On the other hand, sometimes it pays to throw out the hammer and use
a sledgehammer.

Wim

Reply via email to