Need clarification on DB_DO_FormBuilder Wiki
| From: | Michel D'HOOGE | Date: | Thu, 01 Jun 2006 09:03:16 +0000 |
| Subject: | Need clarification on DB_DO_FormBuilder Wiki | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24217@lists.php.net to get a copy of this message | ||
Hello
I am reading the FormBuilder wiki with the uttermost interest and I found
some comment that either I don't understand properly or are wrong. In both
cases, I think something should be done ;-)
http://pear.reversefold.com/dokuwiki/doku.php?id=pear:db_dataobject_formbuilder:callback_methods#pregenerateform_fb
> preGenerateForm(&$fb)
> This method will be called before the form is generated. Use this to
> change property values or options in your DataObject. This is where you
> should set up fb_preDefElements.
Since the formbuilder instance is provided, isn't is simpler to directly
modify $fb? I'd rather do $fb->preDefElements for instance.
> The one parameter is the FormBuilder object which will be passed into
> this method by reference. You can access any settings or functions you
> need.
> Note: options in the DataObject will not be copied over into the
> $fb automatically until after preGenerateForm(). If you need them in
> there or need to use FormBuilder functions which rely on them, call...
The sentence is not clear for me :-( Is it correct if I write:
Note: Options defined in the DataObject ($fb_*) are only copied into the $fb
instance after preGenerateForm() has been called. If you need them in
preGenerateForm() or use FormBuilder functions which rely on them, call...
--
Michel