can't get [PEAR] DB_DataObject_FormBuilder to build a form

From: Date: Thu, 23 Dec 2004 11:55:42 +0000
Subject: can't get [PEAR] DB_DataObject_FormBuilder to build a form
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16426@lists.php.net to get a copy of this message
I spent all day going throuigh and getting [PEAR] DB_DataObject to work - hurray! Pretty cool stuff. I want to go the next step and make form generation a common practice of mine which means I need to learn DB_DataObject_FormBuilder. I think I am missing something fundamental. Does DB_DataObject_FormBuilder create forms on the fly whenever you need them but they are never any permanent files OR are they auto-generated one time into actual file that you then you customize? Below is the code I found as an example and used but it did not work even after hours of changing varables. I have gone through every documentaion I can find. What am I missing in terms of the code below and in my understanding of DB_DataObject_FormBuilder? The error is: Fatal error: Call to undefined function: getform() in line 13 Thanks for ANY help. <?php require_once('DB/DataObject.php'); require_once('DB/DataObject/FormBuilder.php'); $config = parse_ini_file('db_dataobject.ini', true); foreach($config as $class => $values) { $options = &PEAR::getStaticProperty($class, 'options'); $options = $values; } $_DB_DATAOBJECT_FORMBUILDER['CONFIG'] = $config['DB_DataObject_FormBuilder']; $review = DB_DataObject::factory('building'); $builder =& DB_DataObject_FormBuilder::create($building); $form =& $builder->getForm(); if ($form->validate()) { $form->process(array(&$builder,'processForm'), false); echo 'New buidler ID: '.$builder->bldg_ID; } echo $form->toHtml(); ?> --------------------------------- Do you Yahoo!? Send holiday email and support a worthy cause. Do good.

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