Mutant has asked for the wisdom of the Perl Monks concerning the following question:
If I give the fields the same name, then Apache::Request kindly returns the data to me as an array, so I can do something like this:
my @field1 = $r->param('field1'); my @field2 = $r->param('field2); my @field3 = $r->param('field3');
Although this isn't pretty, I can then iterate over the first array, and grab the value out of the other arrays with the same index number.
The problem is, when I have a field that's a checkbox. If the box isn't checked, then I get no value in the array, and the index numbers don't line up.
I suspect there's a better way of doing this, but if not, is there a way around the problem with checkboxes?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple rows in web forms
by ikegami (Patriarch) on Sep 29, 2004 at 14:05 UTC | |
by Mutant (Priest) on Sep 29, 2004 at 14:49 UTC |