Re: Quickform 2.10. Problem with date element

From: Date: Tue, 08 Apr 2003 11:29:40 +0000
Subject: Re: Quickform 2.10. Problem with date element
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4701@lists.php.net to get a copy of this message
<carsten.bleek@gmx.de> wrote : > Hi, > > I get a fatal Error when using date elements within a group element. > Here is my example: > > http://open-hr.org/jobAdmin/test.php > > after submiting I get a: > *Fatal error*: Call to a member function on a non-object in > */home/carsten/external/pear/HTML/QuickForm/group.php* on line *273* > > This line expects an element object, but a vardump on the element returns > a: > > array(3) { ["d"]=> string(1) "1" ["M"]=> string(1) > "1" ["Y"]=> string(4) > "2001" } > > This problem occurse in combination with php-4.2.3. With php4.3.2RC1 it > works fine. > > Any Idea? This line looks weird for me: $element =& $form->addGroup($date, date, _("publish between")); You can maybe try: $element =& $form->addGroup($date, 'date', "publish between"); Maybe also try to get the CVS version of date.php (only this one) to see if it works. BTW, looking at your code, you might try to create a new QuickForm Element called jsdate or dyncalendar, instead of using date and javascript in the label. Base it on the current date.php code. If you come up with something nice, please send it to me, I'll review it and maybe add it to QuickForm. I also think the addHeader looks terrible ;) You will probably appreciate the new renderers... :) Bertrand Mansion Mamasam

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