Re: Customising DB_DataObjects Formbuilder
| From: | Dan Rossi | Date: | Thu, 28 Apr 2005 20:26:04 +0000 |
| Subject: | Re: Customising DB_DataObjects Formbuilder | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19005@lists.php.net to get a copy of this message | ||
yes u cant get away with RTFM coz the site is down :)
On 29/04/2005, at 3:24 AM, Justin Patrin wrote:
On 4/28/05, Dan Rossi <pear@electroteque.org> wrote: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 :|If you set up the linkDisplayFields correctly this won't happen. I'd tell you to check the docs, but they're not up at the moment. :-( Hopefully later today I'll have them back up. For now, check the FormBuilder.php file and search for the linkDisplayFields member vars. There should be docs above it.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.In regards to your original question, it sounds like you haven't set up your db.links.ini file. See the section on the bottom of this page: http://pear.php.net/manual/en/package.database.db-dataobject.intro-relations.php If you're looking for a full frontend I have a package called DB_DataObject_FormBuilder_Frontend which gives you full editing capabilities for an entire database. It could be fairly easily changed to only do only certain tables. It's also called RDBEdit (an old name I came up with before I started using PEAR). You can download it off of SourceForge. https://sourceforge.net/projects/rdbedit/On 28/04/2005, at 8:35 PM, Alister Bulman wrote:--Justin Patrin --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpOn 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 = 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 week, 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