Re: Restrict rows returned for auto Select creation with DB_DataObject_FormBuilder for linked field

From: Date: Fri, 23 Feb 2007 14:30:36 +0000
Subject: Re: Restrict rows returned for auto Select creation with DB_DataObject_FormBuilder for linked field
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26664@lists.php.net to get a copy of this message
Greetings Brett, Thanks a lot! Just overloaded prepareLinkedDataObject() in the appropriate object and invoked whereAdd() with the right statement on the linked dataobject and it worked like a charm! This will be very useful for my ongoing development! Thanks again Jonathan
On 2/23/07, Jonathan Smit <jonathan@lazyant.co.za> wrote:
Greetings,
Question
How do I restrict the rows returned during automatic Select Box creation by DB_DataObject_FormBuilder for a linked field?
See the documentation on prepareLinkedDataObject... this should cover the functionality you're looking for. You simply add in a callback method into your dataobject, which will be called before the linked data is fetched, allowing you to prepare it in any way you like. http://pear.reversefold.com/dokuwiki/doku.php?id=pear:db_dataobject_fo rmbuilder:callback_methods#preparelinkeddataobject_linkeddataobject_fi eld Good luck! http:saltybeagle.com aim:ianswerq


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