[FORMBUILDER][QUICKFORM_CONTROLLER]
| From: | Marco Sottana | Date: | Mon, 11 Dec 2006 13:37:52 +0000 |
| Subject: | [FORMBUILDER][QUICKFORM_CONTROLLER] | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26072@lists.php.net to get a copy of this message | ||
i would like to use quickform and controller for editing my tables.. anyone can help me?
[code]
require_once 'HTML/QuickForm/Controller.php';
// Load some default action handlers
require_once 'HTML/QuickForm/Action/Next.php';
require_once 'HTML/QuickForm/Action/Back.php';
require_once 'HTML/QuickForm/Action/Jump.php';
require_once 'HTML/QuickForm/Action/Display.php';
class FormBuilderPage extends HTML_QuickForm_Page {
function buildForm() {
$this->_formBuilt = true;
$do =& DB_DataObject::factory('tbl_link');
$do->fb_addFormHeader = false;
//this is important
$do->fb_createSubmit = false;
$fb =& DB_DataObject_FormBuilder::create($do);
$fb->useForm($this);
$fb->getForm();
$this->fb=$fb;
$this->do=$do;
$this->addElement('submit', $this->getButtonName('next'), 'Next >>');
}
/*
function getX($id){
$this->do->get($id);
}
*/
}
function ModificaLink($id,$azione){
$cont =& new HTML_QuickForm_Controller('FBController');
$cont->addPage(new FormBuilderPage('FBPage'));
//$cont->getX($id);
$cont->run();
}
[/code]