[mod://HTML::FillInForm] rocks hard, but <a href=http://rt.cpan.org/Ticket/Display.html?id=44105>
it neither can accept or return
HTML::Tree instances,</a> even though it works with them internally.
<P>
Therefore, those of us who operate on HTML as trees (e.g. [mod://HTML::Seamstress]) 
have to do all the following to leverage FillinForm:
<OL>
<LI>convert our HTML to a string
<LI>pass it fillinform
<LI>get back the result and turn it back into a tree to continue processing
</OL>

<P>
Now there is a <CODE>fillinform</CODE> method in [mod://HTML::Element::Library] and here is how it's used:
<P>

<h3>first the html "template"</h3>

<CODE>

<html>
<head>
</head>

<body>

<form>

    <input type="text" id="age" name="age" value="balbalh" />
    <input type="text" id="email" name="email" />
    <input type="text" id="zipcode" name="zipcode" />

</form>

</body>
</html>
</CODE>



<h3>our Perl program</h3>

<CODE>


my %form = 
  (
   age => 77,
   email => 'ben@perlmon.com',
   zipcode => '29063-2134'
  );


use form_example;
my $tree = form_example->new;


# calls 
my $html = $tree->fillinform(\%form) ;

warn $html;

</CODE>


<h3>and the html form is filled in ...</h3>

<CODE>
<form>
<input value="77" name="age" type="text" id="age" /> 
<input value="ben@perlmon.com" name="email" type="text" id="email" /> 
<input value="29063-2134" name="zipcode" type="text" id="zipcode" />
</form>

</CODE>


<h3>Now the Perl class to treeify our HTML</h3>

<CODE>
[tbrannon@devel fillinform]$ spkg.pl --base_pkg=HTMLBase form_example.html 
comp_root........ /home/tbrannon/prg/html-element-replacer/HTML-Element-Replacer/ex/tables/
html_file_path... /home/tbrannon/prg/html-seamstress/samples/fillinform/
html_file........ form_example.html
html_file sans... form_example
substr outside of string at /usr/bin/spkg.pl line 195.
WARNING: the comp_root and html_file_path are not equal for the extent of comp_root...
This may lead to incorrect calculations at /usr/bin/spkg.pl line 197.
</CODE>

<h3>DONE!</h3>
have a nice day!
