Re: default values for fields
Sebastian Birnbach <[email protected]> Wed, 26 Jul 2017 21:28:15 +0200
| Newsgroups | gmane.comp.horde.turba |
|---|---|
| Message-ID | <CACTNBFMjNnXeBujP1n3r8b=78HbwC0N1EgEtT-BqycRuVT2ncA@mail.gmail.com> |
2017-07-25 14:25 GMT+02:00 Jan Schneider <[email protected]>: > > Zitat von Sebastian Birnbach <[email protected]>: > > 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 ); -- turba mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]