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

Bug #7400 When setting the default on one part of a hierselect the JS fails
Submitted: 2006-04-15 03:01 UTC
From: justinpatrin Assigned:
Status: Duplicate Package: HTML_QuickForm (version CVS)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2006-04-15 03:01 UTC] justinpatrin (Justin Patrin)
Description: ------------ If I set the default for only one option in a hierselect (or any # less than the max) the JavaScript fails and none but the first select work. See: http://pear.reversefold.com/hierselect.php This is caused by naive code in setValue() in the hierselect element which sets the # of elements based on the # of options in setValue(). I'm *really* not sure why this is as setValue() has nothing to do with setting the options. The fix is to remove the line reading: $this->_nbElements = count($value); from setValue().

Comments

 [2006-05-29 16:12 UTC] avb (Alexey Borzov)
Looks like a duplicate of bug #6766