Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #2278 Error in documentation
Submitted: 2004-09-04 11:35 UTC
From: jan at ivtaco dot se Assigned:
Status: Bogus Package: HTML_QuickForm
PHP Version: 5.0.1 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2004-09-04 11:35 UTC] jan at ivtaco dot se
Description: ------------ The example on the page: http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.addgrouprule.php doesn't work... =/ Reproduce code: --------------- $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'A', null, 'A'); $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'B', null, 'B'); $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'C', null, 'C'); $checkbox[] = &HTML_QuickForm::createElement('checkbox', 'D', null, 'D'); $form->addGroup($checkbox, 'ichkABCD', 'ABCD:', array(' ', '<br />')); // Simple rule: at least 2 checkboxes should be checked $form->addGroupRule('ichkABCD', 'Please check at least one box', 'required', null, 2); Expected result: ---------------- The expected result would be an alert box or something similar stopping the user from submitting the form as the other rules do.

Comments

 [2004-09-04 11:38 UTC] jan at ivtaco dot se
Just a note: it is the rule that doesn't work. The four checkboxes turn out okej...
 [2004-09-04 12:14 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!