DB_DataObject_FormBuilder: where to set select_display_field?
| From: | Dot Deb | Date: | Sun, 06 Mar 2005 23:55:59 +0000 |
| Subject: | DB_DataObject_FormBuilder: where to set select_display_field? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17890@lists.php.net to get a copy of this message | ||
I'm quite new to PEAR, in general, and far more new to
DB_DataObject_FormBuilder.
The main problem is that I can't find reliable documentation.
So, the main objective of this message is to get some good references.
Looking at the the particular problem: I can't manage to have "hobby
name" in a select
for a "person" form, referencing to a (secondary) "hobby" table.
The said "Select" shows only hobby_ids.
How can I to set the "select_display_field" option?
Here is the auto generated DB_DataObject.ini:
[hobby]
id = 129
name = 34
[hobby__keys]
id = N
[person]
id = 129
name = 34
hobby_id = 1
[person__keys]
id = N
And part of the main file from the pear.php.net example.
[...]
// FormBulder
$fg =& DB_DataObject_FormBuilder::create($person);
$form =& $fg->getForm();
if ($form->validate()) {
$form->process(array(&$fg,'processForm'), false);
$form->freeze();
}
$form->display();
I read the "rapidprototyping.pdf" presentation but I can't obtain the
results shown there.