- or download this
my $query = new CGI;
my $template = HTML::Template->new(filename => 'template.tmpl',
associate => $query);
- or download this
sub selectify {
my $values = shift;
...
}
} @{$values}];
}
- or download this
$template->param(some_loop => selectify(\@values,\@labels,[$query->par
+am('some_param')]);
- or download this
<select name="some_param">
<tmpl_loop name="some_loop">
<tmpl_include name="inner_loop.tmpl">
</tmpl_loop>
</select>
- or download this
<option value="<tmpl_var name="value" escape="html">"<tmpl_if name="se
+lected"> selected="selected"</tmpl_if>><tmpl_var name="label" escape=
+"html"></option>