For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > April 2005 > Re: [PEAR] Customising DB_DataObjects Formbuilder









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Customising DB_DataObjects Formbuilder
Alister Bulman

2005-04-28, 8:57 am

On 4/28/05, pear@electroteque.org <pear@electroteque.org> wrote:
> Hi there, I am looking at using formbuilder for starters I am wanting to
> build a frontend editor, to manage data in all the list menus of a form.
> This table is in seperate tables. They all have foreign key relations
> however formbuilder is treating them as text and not displaying a
> pulldown , any ideas ?


You need to set
$fb_linkDisplayFields =3D array('domain'); // when in a select, show domai=
n name
in the 'destination' DataObject
and
$fb_linkDisplayFields =3D array('client', 'domain'); // client and
domain are ID's from elsewhere
in the DO definition where you link from.

It took me a while to figure that out last w, but when I did, I can
write a basic form to database in a matter of minutes, based on what
I've done thus far - mostly by just changing the names in the
DO::factory calls

Alister
Dan Rossi

2005-04-28, 8:57 am

I dont really get ya here, i dont think its gonna do what i need, i may
need to get the links dynamically, it also seems to wanna display the
pirmary keys too :|

What I am attempting of doing is building a class say data manager , i
build a config array of the tables i want to edit then for each table i
can display its contents to edit, these tables are for displaying
information int he list menus for the parent table. So this is for the
user to manage what is displayed in the menus.

so

manage.php?table=departments will load up the DO departments, display a
list of the data then

manage.php?table=departments&action=edit&id=1

will load the table data.

On 28/04/2005, at 8:35 PM, Alister Bulman wrote:

> On 4/28/05, pear@electroteque.org <pear@electroteque.org> wrote:
>
> You need to set
> $fb_linkDisplayFields = array('domain'); // when in a select, show
> domain name
> in the 'destination' DataObject
> and
> $fb_linkDisplayFields = array('client', 'domain'); // client and
> domain are ID's from elsewhere
> in the DO definition where you link from.
>
> It took me a while to figure that out last w, but when I did, I can
> write a basic form to database in a matter of minutes, based on what
> I've done thus far - mostly by just changing the names in the
> DO::factory calls
>
> Alister
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com