aborting QuickForm::process()?

From: Date: Tue, 13 Jul 2004 15:08:49 +0000
Subject: aborting QuickForm::process()?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13674@lists.php.net to get a copy of this message
Hello, I'm just wondering, what would be the proper way to abort form processing from my callback function? That is, in my callback function that I tell QuickForm::process to call, I want to check a database, and if certain conditions aren't met, I want to either raise an error, or return some sort of error value, which hopefully will allow me, in my main form code, to determine that the form processing failed, and to display an error message and re-display the form. So I guess my question is two-fold: what kind of code do I use inside the callback function to abort the processing, and what kind of code do I use in my main form to detect if it was processed successfully? I'm hoping for something like: if ( !(PEAR::isError($err = $quickform->process("mycallback", false)))) { //processing occured successfully } else { //error condition in processing. Display error text and $quickform->display(); }

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