Re: can't get [PEAR] DB_DataObject_FormBuilder to build a form
| From: | Justin Patrin | Date: | Thu, 23 Dec 2004 21:40:16 +0000 |
| Subject: | Re: can't get [PEAR] DB_DataObject_FormBuilder to build a form | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16441@lists.php.net to get a copy of this message | ||
On Thu, 23 Dec 2004 12:54:03 -0800 (PST), l Burnerheimerton
<lburnerheimerton@yahoo.com> wrote:
> The code below is what he suggested and worked. Actually before changing
> much of it, I just changed:
>
> $review = DB_DataObject::factory('building');
> $builder =& DB_DataObject_FormBuilder::create($building);
>
> to
>
> $building = DB_DataObject::factory('building');
> $builder =& DB_DataObject_FormBuilder::create($building);
Hehe...just a variable name. Sorry about that, I missed it too. I
usually assume that people catch that stuff on their own. ;-) Glad you
got it working.
>
> and it worked. But I went further on his suggestion and chnaged it to
> include the error checking as below.
>
> Now I have to delve into how to write QuickForm code through Form_Builder -
> I was just getting confortable with QuickForm ;-)
Well, it does most of it for you. You can pre-create elements if you
*must* with the preGenerateForm callback and you can customize the
auto-created ones in postGenerateForm. These are on the wiki you
mention below in the callbacks section.
>
> Seriously, I REALLY like what you guys have built.
Glad you like it. Suggestions are welcome. Tutorials are even more
welcome. :-) Many people have proposed them, but no one has submitted
one yet...
>
> I am to the following sites for more learning. If you have more where I can
> get up to speed on how to format the output of fields, I'd appreciate you
> posting those. Thanks again.
The rest of the pages on that wiki are also important. If you haven't
been there yet, start from this page:
http://opensource.21st.de/tiki-index.php?page=DB_DataObject_FormBuilder
>
> http://opensource.21st.de/tiki-index.php?page=Beyond+Advanced
I'm proud of this one (as I am in general of FB). It's mostly my own
ideas when playing wround with DO and FB in my own apps. I use
"virtual fields" quite often to make something look like one record
when it's in fact more like 3 or 4. :-)
--
Justin Patrin