I am using QuickForm to create a couple of check boxes grouped in a form. I have a rule added that when the form is submited, at least one of the check boxes has to be selected for the form to validate.
When I do not check a box, it validates correctly spitting out the error ok, but when I check one or more of the boxes, it spits out this error:
Fatal error: Call to a member function on a non-object in /usr/share/pear/HTML/QuickForm/group.php on line 386
Here is my code:
// Checkboxes to select items to request
$boxes[] = &HTML_QuickForm::createElement('checkbox', 'catalogue', null, 'request catalogue');
$boxes[] = &HTML_QuickForm::createElement('checkbox', 'colorchips', null, 'request color chips');
$form->addGroup($boxes, 'boxes', null, ' ');
$form->addGroupRule('boxes', 'Please select one or more items to request', 'required', null, 1);