Re: HTML_QuickForm_Controller and setDefaults

From: Date: Wed, 13 Sep 2006 18:02:00 +0000
Subject: Re: HTML_QuickForm_Controller and setDefaults
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25128@lists.php.net to get a copy of this message
Alexey Borzov wrote: > When running special case code to check form-pages that weren't seen by > users (lines 243-259 of Controller.php), such forms erroneously consider > themselves submitted. Thus defaults for checkboxes and (probably) > multiple selects are not used. Yes, That seems to be the case. So the submit value is set instead of the default one, which is empty since the page hasn't been seen. I did a really dirty one and it made the checkboxes work (and everything else as well), I set $page->_flagSubmitted = false; on line 245 in Controller.php Now I am happy, it works like a charm :) I don't know if this is the way to fix it, probably the setting of _flagSubmitted should be avoided somewhere else. Probably a bug should be opened, should I do it or? Thanks Alexey, you have been of great help! Kim

« previous php.pear.general (#25128) next »