> Hi,
> 
>    I am using the Perl CGI module to generate HTML form elements. One
of these elements is a
> checkbox. Following is my definition of this checkbox
> 
>    print $q->checkbox(-name=>'want_media',
>                       -checked=>'checked');
> 
>    The problem is, when the page gets displayed, I get a checkbox but
with the name 'want_media'
> beside it. Why does this want_media thing keep appearing near my
checkbox?. I would like to get
> rid of it on the screen.
> 
>    Thanks in advance for any suggestions.
> 

The docs state that in the case that no label is provided the -name
value will be used, -name is required. This is the reason why I don't
like using autogenerated HTML, seldom do my desires and those of the
module creator match up, having said that...

Add an empty label argument...

print $q->checkbox(-name=>'want_media',
                   -checked=>'checked',
                   -label=>'',
                  );
HTH,

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to