$request['params']['return'] = array_unique(array_merge($list, $request['extra']));
$request['params']['options']['sort'] = 'sort_name';
// Contact api doesn't support array(LIKE => 'foo') syntax
- $request['params'][$request['search_field']] = $request['input'];
+ if (!empty($request['input'])) {
+ $request['params'][$request['search_field']] = $request['input'];
+ }
}
/**
};
/**
- * Select2 api leaves something to be desired. To alter options on-the-fly often requires re-rendering the whole thing.
- * So making this function public in case anyone needs it.
+ * Wrapper around select2 initialization function; supplies defaults
* @param options object
*/
$.fn.crmSelect2 = function(options) {