Re: DB_DataObject_FormBuilder - result of processForm() from postProcessForm()

From: Date: Sat, 10 Jul 2004 23:33:41 +0000
Subject: Re: DB_DataObject_FormBuilder - result of processForm() from postProcessForm()
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13620@lists.php.net to get a copy of this message
There are only two situations where processForm() will return false. One is if there is no key. In this case, postProcessForm isn't run. The other is if validateOnProcess is true and the data doesn't validate. It seems to me that one of these should be changed. Either postProcessForm isn't called if validation fails or it is still called if there is no PK. In the latter case, I see no problem with adding a second optional parameter to postProcessForm which will be the return value of processForm. Markus, Norbert, what do you think? On Sun, 11 Jul 2004 06:14:47 +1000, Doug Kearns <djkea2@mugca.its.monash.edu.au> wrote: > On Sat, Jul 10, 2004 at 12:51:53PM -0700, Justin Patrin wrote: > > Sounds like it might be a good idea, but why exactly do you need this? > > I want to know if processForm() has succeeded before sending out success > notifications. ;-) > > > If processForm is called, then it means that the form was submitted > > and passed the validation, meaning that the data should have been > > committed to the DB. > > What if $validateOnProcess is set to true, for example? > > > If you want to know what changed, you'll have to check yourself > > anyway. > > Sure, but a simple status flag is really good enough for many purposes. > > Regards, > Doug > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > !DSPAM:40f04c3460521922288822! > > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

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