Home » HTML » HTML_QuickForm_Controller » Bug #8687
Incorrect handling of default values for non-modal unseen pages.
Details
| Submitted | 2006-09-14 05:55 UTC |
|---|---|
| From | kim at conealley dot net |
| Assigned | avb |
| Status | Closed |
| Package | HTML_QuickForm_Controller |
| PHP Version | 5.1.6 |
| OS | Debian GNU/Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-09-14 05:55 UTC] kim at conealley dot net
Description:
------------
When setting default values for checkboxes and multiple select fileds on a tabbed Controller then the default values are not applied is the page is not physically visited. The problem is due to the fact that the components to which the default values should be applied think they have been submitted and thus applies the submitted value, which is empty on unseen pages.
Adding
$page->_flagSubmitted = false;
on line 245 in Controller.php after
page =& $this->_pages[$key];
shoule fix the problem (but it must be thoroughly). this since applying defaults now works and _flagSubmitted is reset to true later on in the loadValues method.
[2006-09-14 05:56 UTC] kim at conealley dot net
(but it must be thoroughly) <- What is was about to say that it must be thoroughly tested to see that it does not break anything else.