Re: FormBuilder and frozen dates
| From: | Etienne van Tonder | Date: | Wed, 07 Sep 2005 03:12:00 +0000 |
| Subject: | Re: FormBuilder and frozen dates | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20831@lists.php.net to get a copy of this message | ||
Hi Justin,
>Do you mean that you applied the change I suggested? As I said, I
>haven't comitted that yet.
Yes I added the changes myself, so far everything seems to be working.
>Ah overload....what a wonderful feature. NOT! Seriously, overloading
>has caused far more trouble than it should have. Are you using the
>overloading features for anything? set/get functions which you haven't
>defined perhaps? If not I suggest turning overloading off for
>DB_DataObject. If you're using PHP4 I suggest turning it off whether
>or not you're using it. It breaks pass-by-reference in functions.
>Alternatively you can fix this by setting
>(date|time|dateTime)OptionsCallback to something not callable, like
>null.
I'm not sure I understand. I thought I had overloading turned off, as per
the manual I;
define('DB_DATAOBJECT_NO_OVERLOAD', true);
before I include the DB/DataObject.php. Do I have to do something else to
turn overloading off?
>No, I don't think that's a valid solution. An update form is an update
>form. If you pass a filled-out DO to FormBuilder it's going to assume
>you want to update rather thna insert.
>You could get around this by adding a hidden field to your form and
>having your "Clear Form" JS set it. Then check that value and set the
>PK to "" before processing.
Sometime I can't see the wood from the trees, I will change my code as you
suggested.
Regards,
Etienne