in reply to Re: HTML::Template with checkbox
in thread HTML::Template with checkbox
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"); ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HTML::Template with checkbox
by GrandFather (Saint) on Sep 05, 2012 at 23:34 UTC | |
by bebewinla (Novice) on Sep 06, 2012 at 00:34 UTC | |
by Anonymous Monk on Nov 03, 2014 at 02:16 UTC |