List of picklist values if the field is of type picklist or multipicklist, null otherwise. */ public function getPicklistValues() { if ($this->get('uitype') == '33') { $db = PearDatabase::getInstance(); $table = $this->getFieldName(); $filed = $this->getFieldName(); if($this->getFieldName() == 'cf_1153') { $table = 'products'; $filed = 'productname'; } $query = 'SELECT '.$filed.' FROM vtiger_'.$table; if($this->getFieldName() == 'cf_1155') { $table = 'users'; $filed = 'username'; $query = 'SELECT CONCAT(first_name, " ", last_name) as username FROM vtiger_'.$table.' WHERE status = "Active"'; } $result = $db->pquery($query, array()); $num_rows = $db->num_rows($result); $fieldPickListValues = array(); for($i=0; $i<$num_rows; $i++) { $picklistValue = $db->query_result($result,$i,$filed); $fieldPickListValues[$picklistValue] = vtranslate($picklistValue,$this->getModuleName()); } return $fieldPickListValues; } return parent::getPicklistValues(); } }