[turba] Dynamic SQL lookup enum attributes

Jan Schneider jan at horde.org
Tue Feb 19 09:30:53 UTC 2008


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Quoting Peter Paul Elfferich <pp at dia.uva.nl>:
>
>> I'm currently experimenting with accessing our mailing database with Turba.
>> This is a relational database using foreign keys to refer to values from
>> different tables. By using left joins in the table definition in
>> sources.phpthe proper values are displayed in Turba, but I'd also like
>> to be able to edit these values.
>>
>> Is it possible to define a dynamic enum in attributes.php which looks up
>> keys and values from related tables? I'd like the values to be listed in a
>> pulldown/list and the key to be stored back into the address table when you
>> edit the record in turba.
>
> Sure, just put the database code to read the enum into attributes.php.

There is even the dblookup form field that already does that for you.  
http://wiki.horde.org/Doc/Dev/FormTypes

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the turba mailing list