in reply to how to define html::template for the following hash in perl/cgi
my @add=( { name=>"name1 ", type =>"text", default=>" " value=[""], entries=>"M". }, { name=>"name2 ", type=>"dropdown", req=>"prc", default=>" " value=["value1","value2","value3"], entries=>" " } );
Then it's just a simple matter of sending the arrayref to your template:
$tmpl->param( blah => \@add );
And then defining a template loop. Take a look at the HTML::Template docs for how to make a loop and use conditionals.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to define html::template for the following hash in perl/cgi
by radiantmatrix (Parson) on Nov 04, 2005 at 14:38 UTC | |
by friedo (Prior) on Nov 04, 2005 at 16:08 UTC |