Subject: | javascript validation error with checkbox and radio when field name contains a dash (-) |
Darwin Kernel Version 8.5.0
Perl: v5.8.6
Ultimate Module, I use it everyday. Maybe there is some special
requirements for field names which I don't know,but otherwise when I
declare:
...
my $form = CGI::FormBuilder->new(
fields => [],
);
$form->field(name => 'new-position', type => 'checkbox', required => 1,
options => [{7 => 'manager'}]);
print $form->render();
...
when I try to submit the form, the browser gives me "Check one or more
of the "New Position" options" error even though I checked the value.
However, without the dash
...
my $form = CGI::FormBuilder->new(
fields => [],
);
$form->field(name => 'newposition', type => 'checkbox', required => 1,
options => [{7 => 'manager'}]);
print $form->render();
...
works perfectly!
*(test in both firefox and safari)