Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Formatting labels of checkbox groups

by Zed_Lopez (Chaplain)
on Aug 16, 2004 at 06:31 UTC ( [id://383206]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Formatting labels of checkbox groups
in thread Formatting labels of checkbox groups

Sorry, I thought the crux of the matter was doing complex, dynamic labelling that was inconvenient with checkbox_group.

Like the first respondent said, you could use ' ' x 4 instead of 4 spaces. If what you really want is columns, use HTML tables or CSS.

Or use -label => '' and put in your own label after the checkbox by hand with CGI::pre("$title    $description    $moretext")

Replies are listed 'Best First'.
Re^4: Formatting labels of checkbox groups
by lcanty (Friar) on Aug 16, 2004 at 07:09 UTC
    Hey again Zed,

    well actually the problem started with dynamic labelling of anywhere between 10 - 2000 checkboxes, which obviously meant creating the one checkbox_group. Unfortunately though im building a web-based interface to some webmin modules. (Webmin is a web base interface to Unix/Linux written in perl)
    http://www.webmin.com/intro.html
    because of this CSS is out of the question.
    Currently the checkbox structure is already in it's own table with columns, but that's where i keep running into blocks. i also require the checkbox labels to also be in columns.
    I was hoping to also achieve this without having to create the possible 2000 boxes individually on the fly.

    i've already tried    but that didnt work, instead all it does is interpret the &nbsp and print it with part of the label.
    I've also tried

    CGI::pre("$title $description $moretext")
    but that seems to embed the  <PRE>tags into the actual desription rather than interpreting them as the html that they're meant to be.

      I'm not suggesting putting &nbsp; or CGI::pre within a -label parameter. I was suggesting outputting them after the checkbox call (and you would have to call checkbox individually for each desired checkbox.)

      If you want to use checkbox_group, you'll need your own, like tye suggested. You could modify your CGI.pm (which will probably bite you in the long run), create a new package that subclasses it, or copy CGI's checkbox_group code into your own stuff and modify it there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found