Re: Filtered select with FormBuilder

From: Date: Tue, 09 May 2006 18:09:42 +0000
Subject: Re: Filtered select with FormBuilder
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24030@lists.php.net to get a copy of this message
On 5/9/06, Jose Manuel Zea <jmzeag@yahoo.es> wrote:
Hi all: Imagine 3 tables A, B and C. There is a 1-N relationship between A and B, and another 1-N between B-C. So by inheritance there´s a virtual relationship between A and C. So, what I need it´s a form for editing and adding new items to C, using a combo for selecting the field B. But I know the value of A, although this it´s not a field for C, what I mean it´s a combo for B but filtered, like a hierselect but I don´t want to show 2 combo boxes, because the value of the first one is known and fixed. Maybe I´m not explaining very well, it´s more simply that sounds. Well, I´m using DB_DataObject_FormBuilder, and I don´t know how to get that filtered select item directly. Can anyone help me please?
Use the prepareLinkedDataObject callback to set the field in the DO. This way it will query with the WHERE clause that you want. See the docs: http://pear.reversefold.com/dokuwiki/doku.php?id=pear:db_dataobject_formbuilder:callback_methods#preparelinkeddataobject_linkeddataobject_field -- Justin Patrin

« previous php.pear.general (#24030) next »