[sf-perl] passing checkboxes as hidden fields
ken uhl
kenuhl at berkeley.edu
Wed Jun 4 13:43:36 PDT 2008
Hi,
I have a question on how to determine the value of a checkbox ( checked
or unchecked ) when
passing check boxes as hidden fields to a separate cgi.
The checkboxes are all all the named 'tagbucket'
with different values,
so I retrieve those this way
use CGI;
my $cgi = new CGI;
my @boxes = $cgi->param('tagbucket');
This gives me a nice array of check box field names, but I don't know if
they are selected,
so I try retrieving each box :
for my $box ( @boxes ) {
my $box_data = $cgi->param($box);
};
This give me nothing.
By the way the check box is defined this way :
my $cb_name = "bulkdeleteHost-type-$htype-row-$hrowid" ;
my $be_bad = $cgi->checkbox( -name => "tagbucket" , -checked => 0,
-value => "$cb_name" , -label => "Bulk Delete?") ;
Any suggestions ?
More information about the SanFrancisco-pm
mailing list