[turba] default values for fields
Sebastian Birnbach
birnbacs at gmail.com
Wed Jul 26 19:28:15 UTC 2017
2017-07-25 14:25 GMT+02:00 Jan Schneider <jan at horde.org>:
>
> Zitat von Sebastian Birnbach <birnbacs at gmail.com>:
>
> Most of my contacts - but not all of them - come from the same country and
>> have the same timezone. I would love to not have to enter that information
>> when I create a person.
>>
>> Is there a way to define default values for such fields?
>>
>
> Yes, you can specify a 'default' value in config/attributes.local.php.
>
Thanks Jan that solved my problem.
To those who may be browsing the mail archive:
If the attribute is a drop-down list one can find out the value that will
be used by viewing the HTML source in ones browser.
E. g. the workCountry attribute will process two letter codes, not names.
Change the attribute defintion in attributes.local.php accordingly:
$attributes['workCountry'] = array(
'label' => _("Work Country"),
'type' => 'country',
'required' => false,
'params' => array('prompt' => true),
'default' => 'DE' // <-- or whatever
);
More information about the turba
mailing list