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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 46 - 19 = ?

 
 [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] avb
Everything works as expected.