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

Bug #152 Hierselect javascript function not always printed
Submitted: 2003-10-24 21:06 UTC Modified: 2003-11-02 04:59 UTC
From: fferreres at ojf dot com Assigned: mansion
Status: Closed Package: HTML_QuickForm
PHP Version: 4.3.3 OS: Gentoo
Roadmaps: (Not assigned)    
Subscription  


 [2003-10-24 21:06 UTC] fferreres at ojf dot com
Description: ------------ The hierselect element uses a constant to make sure the function which loads the options of the second element is only written once. Problem: if you freeze the first hierselect element or decide not to render the element for whatever reason, and the forms has a second hierselect (or there is a second form which uses a hierselect), the array loading function will not get printed (rendering all hierselect elements unusuable). Reproduce code: --------------- A) Add a hierselect element Add a second hierselect element freeze the first hierselect Display B) The same as A), but have a second form with a hierselect field instead of a second hierselect in the first form. C) Same as B), but instead of freezing the first hierselect, freeze the form (or do just display the page not....maybe because it was validated, and you want a new form to be displayed). Expected result: ---------------- The hierselects prints the javascript function once if there is a hierselect field displayed. Actual result: -------------- Function not printed....

Comments

 [2003-10-27 14:09 UTC] avb
Maybe define the constant only when actually outputting the function?
 [2003-11-02 04:59 UTC] mansion at php dot net
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.