Re: Re: QuickForm process()

From: Date: Tue, 01 Apr 2003 23:28:29 +0000
Subject: Re: Re: QuickForm process()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4579@lists.php.net to get a copy of this message
Wow! Thank you. This is exactly the kind of example I was hoping to see. - Charles On Tuesday, April 1, 2003, at 06:07 PM, Jack Kline wrote:
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
-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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