#23746 [Opn->Asn]: Default values do not work when $_POST is set
| From: | arnaud@php.net | Date: | Thu, 22 May 2003 06:26:09 +0000 |
| Subject: | #23746 [Opn->Asn]: Default values do not work when $_POST is set | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16610@lists.php.net to get a copy of this message | ||
ID: 23746
Updated by: arnaud@php.net
Reported By: nlenz at ivcf dot org
-Status: Open
+Status: Assigned
Bug Type: PEAR related
Operating System: Linux
PHP Version: 4.3.1
-Assigned To:
+Assigned To: mansion
Previous Comments:
------------------------------------------------------------------------
[2003-05-21 18:49:49] nlenz at ivcf dot org
Description of problem:
1. $_POST["someUnrelatedVar"] is set.
2. Create a QuickForm object using POST
3. Call setDefaults()
4. Default values will not show up, even though the element's name was
not set in $_POST.
Solution:
In the element.php file, onQuickFormEvent method.
Change:
if (isset($caller->_submitValues) && count($caller->_submitValues) > 0)
{
To:
if (isset($caller->_submitValues) && count($caller->_submitValues) > 0
&& $this->_findValue($caller->_submitValues) != null) {
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23746&edit=1