Hallo monks,

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.