I have my cgi script very similar to what you have. hastable contains the filenames to be output it. I don't have the f1,f2...values for the check, not sure if it's needed.
$q = new CGI; $template = HTML::Template->new(filename => "$displaypage", associate => $q); my @loop; foreach $index (sort {$a <=> $b} keys %hashtable) { my ($fn) = @{$hashtable{$index}}; my %row = ( index => $index, fn => $fn , check => " "); push (@loop, \%row); } $template->param(files_loop=> \@loop); send_header(); print $template->output;
so after user click on the checkboxes for the files that he wants to download, then he click on the "download" button, in my cgi script it will go to "sub downloadFiles", in here I am not sure how to get the values of the checkboxes or filenames , I tried this :
It did not get any values in @files. Not sure what values it should returned. I tried you suggestion adding f1,f2 with instead using index number 1,2,3... but still don't know how to get the checkboxes values. Please help.sub downloadfiles { @files = $q->param("field"); ... }
In reply to Re^2: HTML::Template with checkbox
by bebewinla
in thread HTML::Template with checkbox
by bebewinla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |