in reply to Re: Re: Re: CGI Checkboxes
in thread CGI Checkboxes
The param method doesn't seem to work for checkboxes.
Oh, yes it does :-)
Here's a cut-down version of what (I think) you're doing:
Which prints:
And it is supposed to print it -- after all, you gave it the value "1", not "checkbox"!
Try instead:
param('checkbox', 1); print checkbox(-name=>'checkbox', -value=>'checkbox', -label=>"My Checkbox\n"); print checkbox(-name=>'checkbox', -value=>'1', -label=>'My Checkbox, value 1');
This should print so:
<INPUT TYPE="checkbox" NAME="checkbox" VALUE="checkbox">My Checkbox <INPUT TYPE="checkbox" NAME="checkbox" VALUE="1" CHECKED>My Checkbox, +value 1
The Sidhekin
|
|---|