Re: QuickForm process()

From: Date: Tue, 01 Apr 2003 23:07:12 +0000
Subject: Re: QuickForm process()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4578@lists.php.net to get a copy of this message
This is a simplified version of what can be done... I use classes and hence I have a MyQuickform class that subclasses Quickform. Doing so I inherit all Quickform methods and variables... thus I can access $this->_submitValues which is an internal 'private' array that contains name/value pairs for all (named) elements in your form and their values upon 'Submit'... This sniblet loops thru the $this->_submitValues and stuffs the info in the DB... Hope this helps /** * Process the form once valid. * * @access private * @return void */ function process() { // loop thru form elements and write them foreach($this->_submitValues as $name => $value) { $this->_updateDB($name, $value); } // Remove Submit/Rest buttons in case frozen form is displayed $this->removeElement('submit'); $this->removeElement('reset'); } "Charles Kline" <ckline@rightcode.net> wrote in message news:0F1FEBF3-6449-11D7-8B80-000393CDCA6A@rightcode.net... > Hi all, > > Does anyone have examples of how to use process() to actually process > my form data? > > Thanks, > Charles >

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