| | |
| | | |
| | | // If Datasource is set, get the data from there |
| | | if(isset($field['datasource']) && is_array($field['datasource'])) { |
| | | $field["value"] = $this->getDatasourceData($field, $record); |
| | | if(is_array($field["value"])) { |
| | | $field["value"] = $field["value"] + $this->getDatasourceData($field, $record); |
| | | } else { |
| | | $field["value"] = $this->getDatasourceData($field, $record); |
| | | } |
| | | } |
| | | |
| | | // If a limitation for the values is set |
| | |
| | | |
| | | // If Datasource is set, get the data from there |
| | | if(@is_array($field['datasource'])) { |
| | | $field["value"] = $this->getDatasourceData($field, $record); |
| | | if(is_array($field["value"])) { |
| | | $field["value"] = array_merge($field["value"],$this->getDatasourceData($field, $record)); |
| | | } else { |
| | | $field["value"] = $this->getDatasourceData($field, $record); |
| | | } |
| | | } |
| | | |
| | | // If a limitation for the values is set |
| | |
| | | if(is_array($field['value'])) { |
| | | $out = ''; |
| | | foreach($field['value'] as $k => $v) { |
| | | //$selected = ($k == $val)?' SELECTED':''; |
| | | $selected = ''; |
| | | $selected = ($k == $field["default"])?' SELECTED':''; |
| | | $out .= "<option value='$k'$selected>$v</option>\r\n"; |
| | | } |
| | | } |