i have a little cgi problem.
I want to make a checkbox_group (cgi.pm) and to put it in a
table column (rowspan). The idea is to select items named in the column right to this column. It works, but not in an optimal way. The boxes are not aligned with the table cells.
Is it possible to make it better?
Murcia
------------------ how it should look like: boxes items ____________ |_| item1 |_| item2 |_| item3
$colgroup = $cgi->checkbox_group( -name=>'embl_group', -values=>[@fieldArray], #-rows=>1, -columns=>1, -nolabels=>1, -linebreak=>'true' ); if(defined $fields){ $rows = $cgi->th({-align=>'left'}, ''); for(my $i = 0; $i < @$fieldNames; $i++){ $rows .= $cgi->th({-align=>'left'}, $fieldNames->[$i]); } my $numberFields = @$fields; for( my $i = 0; $i < @$fields; $i++){ $rows .= $cgi->start_Tr(); $rows .= $cgi->td({'-valign'=>'middle', -rowspan=>$numberField +s}, $colgroup) if $i == 0; $rows .= $cgi->td({'-valign'=>'middle', -height=>22}, $fields- +>[$i]); $rows .= $cgi->end_Tr(); } }
20030408 Edit by Corion: Added formatting and CODE tags
In reply to cgi checkbox_group in table by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |