in reply to Re: checkbox help
in thread checkbox help
Firstly of all, your code will display -no data- when there is data and that data is 0 (zero). Fix:
print OUT defined($in{$_}) ? $in{$_} : '-no data-', "\t";
Furthermore, your approach won't work. According to the HTML spec (and verified with a few browsers),
A switch is "on" when the control element's checked attribute is set. When a form is submitted, only "on" checkbox controls can become successful.
That means that only checked checkboxes are submitted. defined($in{$_}) will always be true.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: checkbox help
by djbryson (Beadle) on Mar 05, 2007 at 19:21 UTC | |
|
Re^3: checkbox help
by Anno (Deacon) on Mar 05, 2007 at 19:04 UTC |