Re: QuickForm quirck or user error?

From: Date: Tue, 25 Mar 2003 11:32:44 +0000
Subject: Re: QuickForm quirck or user error?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4413@lists.php.net to get a copy of this message
<M.Kaening@osram.de> wrote : > Hi Bertrand, > > at first I tested that script on this computer and noticed that there > appeared a warning which I didn't see on my comp at home: > > ---snip--- > Warning: htmlspecialchars() expects parameter 1 to be string, array > given in /usr/local/lib/php/HTML/Common.php on line 98 > ---snip--- > > Well, and this appears only before submission! > > > What concerns this: >> Can you try with setDefaults() used before any addElement() is done and let >> me know if it changes anything ? > > I changed the code a bit: > > > ---snip--- > > // append initial values and add hidden elements for them > foreach($odV as $key => $value) $dV[$key] = $value; > > var_dump($dV); > echo '<PRE>'; > > $form->setDefaults($dV); > > reset($odV); > foreach($odV as $key => $value) $form->addElement('hidden', $key,$value); > > $form->addElement('date', 'Date', 'Date:', > > ---snip--- > > So at first the defaults will be set and only later the element gets > added. > > BUT, no change still there is the empty odate! Also removing $value from > the addElement parameter list (since it wouldn't be necessary anymore) > doesn't change the situation. > > Hope this helps to find the cause. > > Marko Hi Marko, I can't help this afternoon, I have to give PHP courses to a class of students... Make sure your version of HTML_Common is the latest, it's a common cause of problems. Bertrand Mansion Mamasam

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