Re: DB_DataObject_FormBuilder steps
| From: | Markus Wolff | Date: | Fri, 29 Aug 2003 12:22:24 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder steps | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7471@lists.php.net to get a copy of this message | ||
LIMBOURG Arnaud wrote:
Hi, my guess is that you need add some conf stuff for dataobjects, markus should add that to the doc i guessI didn´t see the point to go too much into detail on this in the FormBuilder docs, as all this is very nicely documented for the DataObject package itself: http://pear.php.net/manual/en/package.database.db-dataobject.intro-configuration.php
And you should be running ... before you hit another obstacle that is ;)Yep, and I can already see the next obstacle, as I´ve made a mistake in my inline docs, where it says:
The line "$form->process($fg, false);" is flawed. It should really be like this: $form->process(array(&$fg,'processForm'), false); ..otherwise, QuickForm´s process method wouldn´t know that it should call the processForm() method within the object passed to it. Regards, Markus" * Most basic usage: * <code> * $do =& new MyDataObject(); * // Insert "$do->get($some_id);" here to edit an existing object instead of making a new one * $fg =& DB_DataObject_FormBuilder::create($do); * $form =& $fg->getForm(); * if ($form->validate()) {* $form->process($fg, false); * $form->freeze();* } * $form->display(); * </code> "