Re: Can HTML_Quickform_Controller be used with DB_Table as HTML_Quickform can?

From: Date: Tue, 24 Oct 2006 16:15:28 +0000
Subject: Re: Can HTML_Quickform_Controller be used with DB_Table as HTML_Quickform can?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25601@lists.php.net to get a copy of this message
I've never used DB_Table, but it seems you can use it in HTML_QuickForm_Controller. This is an example : /// code class customer_info extends HTML_QuickForm_Page {
    function buildForm()
    {
$this->_formbuilt = true; $cols = array('email', 'name','login'); $book = &new User();// User extends DB_Table $book->addFormElements($this, $cols); $prevnext[] =& $this->createElement('submit', $this->getButtonName('back'), '<<'.__('Back'));
         $prevnext[] =& $this->createElement('submit',   $this-
getButtonName('next'), __('Next').'>>'); $this->addGroup($prevnext, 'buttons', '', '&nbsp;', false);
} } /// Not tested but at least this should give you an idea on how to use it. Le 24 oct. 06 à 17:12, Matthew Vickery a écrit :
Is it possible to use HTML_Quickform_Controller with DB_Table? I have used DB_Table with HTML_Quickform, but can I implement these together with HTML_Quickform_Controller? If yes, will someone point me in the direction of a good tutorial, please? Also should I be looking at DB_DataObject and FormBuilder as successors to DB_Table...? Many thanks, Matthew --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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