in reply to Getting all used parameters from a Template::Toolkit template
Update: I just re-read the post and realized this isn't what you would want, nevermind
Another option is to shove all of your form values into a hashref and send that to TT, like this:
my $form_fields = { user_name => 'username', user_pass => 'userpass', other_field => 'value', };
Later on, pass this into TT as a var named 'form' or something like that. Your template code would be something like:
[% FOREACH field IN form %] [% field.key %]: [% field.value %] [% END %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting all used parameters from a Template::Toolkit template
by Corion (Patriarch) on Mar 11, 2009 at 13:32 UTC | |
by assemble (Friar) on Mar 11, 2009 at 13:33 UTC |