[turba] How to define dropdown lists and checkboxes in attributes.php?

Jan Schneider jan at horde.org
Mon Aug 21 15:11:49 PDT 2006


Zitat von Volker Then <vt at volkerthen.com>:

> Hi,
>
> I need some drop down lists (select fields) and checkboxes (yes/no)  
> in some of my addressbooks. How would I define those in  
> config/attributes.php? I'll searched the wiki but did not find  
> anything.

An enum (select) field looks like this:

$attributes['currency'] = array(
     'label' => 'Währung',
     'type' => 'enum',
     'params' => array(array('EUR' => 'EUR', 'USD' => 'USD')),
     'required' => false
);

A checkbox should be straight forward and doesn't even require 'params'.

Jan.

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



More information about the turba mailing list