Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: CGI.PM checkbox_group

by thewebsi (Scribe)
on Aug 23, 2013 at 06:25 UTC ( [id://1050602]=note: print w/replies, xml ) Need Help??


in reply to CGI.PM checkbox_group background color

You would have to use something different to get exactly that output, eg:

print label ( span ({ style => "background-color: #345643;" }, input ( +{ type => "checkbox" }) ) );

However, in practice I find that CSS can achieve desired results without additional tags. In your particular example,
print '<span style="background-color: #345643;">' . checkbox_group ({ values => "" }) . '</span>';
achieves the same effect. Of course your "real" scenario may be more complicated.

Replies are listed 'Best First'.
Re^2: CGI.PM checkbox_group
by jhuijsing (Acolyte) on Sep 07, 2013 at 23:23 UTC
    Have a patch for the CGI.pm module
    if ($XHTML) { push @elements, CGI::label($labelattributes, qq(<input type="$box_t +ype" name="$name" value="$_" $checkit$other$tab$attribs$disable/>$lab +el)).${break}; } else {

    to

    if ($XHTML) { my $labelattr = ref $labelattributes eq 'HASH' ? $labelattributes-> +{$_} : $labelattributes ; push @elements, CGI::label($labelattr,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1050602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found