[turba] Multiple selection for keywords or categories

Radim Machů radim at machu.cz
Wed Jan 30 18:28:45 UTC 2008


Hi,

we use Horde Webmail Edition v1.0.3.

I was inspired by http://wiki.horde.org/TurbaOutlook2003 which refers 
how to configure and address book fields.

I am not willing to have a mess of Outlook addressbook fields :-)) but I 
would like to include a couple of  new fields. One of them should be a 
multiple selection keyword/category list. I have found out that 
following Horde Form Types could be used 
(http://wiki.horde.org/Doc/Dev/FormTypes):
mlenum          n/a      Multi-level drop down lists           Values to 
select from, Prompt text
multienum     enum     Multiple selection         Values, Size
keyval_multienum     multienum     Multiple selection         Values, Size

Could you please help how to set such a multiple selection field:
* in attributes.php,
* in sources.php,
* and in the database?

My suggestions or questions follows:

**attributes.php ******************************

|require_once 'Horde/Prefs/CategoryManager.php';
$cManager = &new Prefs_CategoryManager();
$categories = array_merge(array(_("Unfiled")), $cManager->get());
$attributes['category_multi'] = array(
    'label' => _("Multiple Categories"),
    'type' => '|keyval_multienum|',
    'params' => array($categories),
    'required' => false
);

|**in sources.php*******************************
|
...
,'category_multi' => 'object_category_multi', 
...|

**in the database******************************
...,
|object_category ||ENUM('/|value1|/','/|value2|/',...),
!!BUT !!
ENUM is ||a| string object that can have only one value, chosen from the list of values |'/|value1|/'|,|'/|value2|/'|, 
while SET is a string object that can have zero or more values, each of which must be chosen from the list of values |'/|value1|/'|, |'/|value2|/'|!!!
***********************************************
            

Thanks for help!

Radim||

-- 
_________________________________________________________
Radim Machů
Hostetin 31
CZ- 687 71
Czech Republic
mailto: radim at machu.cz



More information about the turba mailing list