in reply to Template Stuff
Then in your template code:#furiously waving hand! my %fields = get_fields(); # field name => old value my @fields; for(keys %fields ) { push @fields, { fname => $_, fvalue => $fields{$_} }; } my $tmpl = HTML::Template->new(); $tmpl->params( old_fields => \@fields ); print $tmpl->output;
You probably want to use escape=html in the tmpl tags, but i've omitted them for the sake of brevity.<tmpl_loop name='old_fields'> <input type='text' name='<tmpl_var fname>' value='<tmpl_var fvalue>' </tmpl_loop>
|
|---|