Re: getDataObjectSelectDisplayValue
| From: | Justin Patrin | Date: | Sat, 23 Oct 2004 16:52:23 +0000 |
| Subject: | Re: getDataObjectSelectDisplayValue | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15065@lists.php.net to get a copy of this message | ||
On Sat, 23 Oct 2004 09:36:26 -0700, Ken Restivo <ken@restivo.org> wrote:
> On Fri, Oct 22, 2004 at 07:38:13PM -0700, Justin Patrin wrote:
> > > I've stared at the source code for this function and it seems really simple.
> > > But, apparently, I am even more simple, and it's not making sense to me. I think I've been
> > > awake for too many hours straight.
> > >
> > > If getDataObjectSelectDisplayValue() is looking at all the fields which have
> > > crosslinks, I'd expect it to return an assoc array. If it is only getting *one* field, I'd
> > > assume it would take the name of that field as a parameter.
> > >
> >
> > We should rename that function now...
> >
> > This function gives you the "display value" of a record. A name of
> > sorts. This defaults to the primary key. To set up different ones, use
> > the fb_linkDisplayFields array in the dataobject.
> >
>
> OK, thanks, I am a fool. If I'd looked more carefully at the data it returned, I'd
> have seen it was the data for $this->___table, which wasn't what I wanted.
>
> So what I need to do for my app is to pull up the FB objects for all the tables I am *linking*
> to, and call getDataObjectSelectDisplayValue() on each of those.
>
> Again, thanks.
>
If this is for display as a single string, then, no you don't have to.
Set up those link fields as the display fields of the DO. Then set up
the display fields of each of the linked DOs. Lastly, set the
linkDisplayLevel to 1 or more, depending on your app:
http://opensource.21st.de/tiki-index.php?page=Formbuilder+configuration+options#id182278
--
paperCrane --Justin Patrin--