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

Bug #2587 Problems with group names containing square brackets
Submitted: 2004-10-22 13:22 UTC
From: mike Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: 4.3.8 OS: N/A
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 : 34 - 23 = ?

 
 [2004-10-22 13:22 UTC] mike
Description: ------------ If the name of a group contains square brackets, one cannot add a rule to that group (tested with radio groups). Reproduce code: --------------- require_once 'HTML/QuickForm.php'; $form = &new HTML_QuickForm('foo'); $r[] = &$form->createElement('radio', null, null, 'yes', 'yes'); $r[] = &$form->createElement('radio', null, null, 'no', 'no'); $form->addGroup($r, 'yesorno[mine]', 'Choose:'); $form->addGroupRule('yesorno[mine]', 'Choose one!', 'required'); $form->addElement('submit', null, 'Submit'); if ($form->validate()) echo "<h1>YEAH!</h1>\n"; $form->display();

Comments

 [2004-10-22 18:10 UTC] avb
Clarification: the bug is not with the rules but rather than with getting a submit value for a group of radios. The error can once again be traced back to getSubmitValue() with its logic for checking for a group of radios conflicting with its logic for getting a submit value of an element with bracketed name.
 [2005-06-13 13:29 UTC] avb
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.