diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index 70ec40fdd0..0e468c1c44 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -68,6 +68,7 @@ class customfields * @var Description of the options or value format for each cf_type */ public static $type_option_help = array( + 'search' => 'set get_rows, get_title and id_field, or use @path to read options from a file in EGroupware directory', 'select' => 'each value is a line like id[=label], or use @path to read options from a file in EGroupware directory', 'radio' => 'each value is a line like id[=label], or use @path to read options from a file in EGroupware directory', 'button' => 'each value is a line like label=[javascript]' diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index 1c3bdc2baa..deb4cd4f57 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -438,11 +438,14 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput }, _setup_ajax_select: function(field_name, field, attrs) { var attributes = ['get_rows','get_title','id_field','template']; - for(var i = 0; i < attributes.length; i++) + if(field.values) { - if(typeof field.values[attributes[i]] !== 'undefined') + for(var i = 0; i < attributes.length; i++) { - attrs[attributes[i]] = field.values[attributes[i]]; + if(typeof field.values[attributes[i]] !== 'undefined') + { + attrs[attributes[i]] = field.values[attributes[i]]; + } } } return true;