in reply to HTML::Template and looping through CGI param with multiple values
And then in my reqinfo.html file:my @dates=$q->param("date"); my @loop_date=(); while (@dates) { my %row_data; $row_data{DATE} = shift @dates; push(@loop_data, \%row_data); } $template->param(THIS_LOOP => \@loop_data); }
I can do it that way, but I'd like to know if I can just associate $q (my CGI object) and loop through the values of the date param somehow. That is something I am still curious about.<TMPL_IF THIS_LOOP> <TMPL_LOOP THIS_LOOP> <b><TMPL_VAR NAME=DATE></b> </TMPL_LOOP> <TMPL_ELSE> <b>You Did Not Select Any Days!</b> </TMPL_IF>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTML::Template and looping through CGI param with multiple values
by Anonymous Monk on Apr 12, 2013 at 03:37 UTC |