This seems like a relatively obvious thing, but since I've seen no sign of an answer in the official docs on CPAN and Google is getting me nowhere, I've come here in the hopes that someone will know off the top of their head.

I'm using CGI.pm to build a web page that will have a group of moderately complex radio buttons. I say "moderately complex" only because the labels for these buttons will be some string followed by a drop-down box (i.e. something done with a select tag). Now, in theory, I would have assumed that the following would work:
my %labels; my $labels{'foo'} = "String" . popup_menu(-name=>'bar', -values=>\@foobard); print radio_group(-name=>'clearchannel', -values=>'foo', -labels=>\@labels); ...
The problem is, the label is being surrounded by an HTML <label> tag, which means that the HTML contained there doesn't get rendered; in fact, instead of my select box, I get the HTML that would be used to create it.

Clearly I can work around this by just printing my radio_group by hand, but that's ugly and a pain to maintain. I had thought that -nolabels=>1 would solve my problem, but it just suppresses my label text altogether. Does anyone know how to make these stupid <label> tags go away, so that my select boxes will actully display that way?

Thanks,
Alex Kirk

In reply to HTML as radio_group label w/CGI.pm by Anonymous Monk

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.