}
$field = $this->_fields[$elementName] ?? NULL;
+ if (isset($this->_pseudoConstantsSelect[$field['name']])) {
+ $this->_pseudoConstantsSelect[$name . '-' . $field['name']] = $this->_pseudoConstantsSelect[$field['name']];
+ }
// hack for profile, add location id
if (!$field) {
$name, $op, $value, $grouping,
'CRM_Contact_DAO_Contact',
$field,
- $field['title'],
+ $field['html']['label'] ?? $field['title'],
CRM_Utils_Type::typeToString($dataType)
);
if ($name === 'gender_id') {
return $field;
}
+ /**
+ * Get the field datatype, using the type in the database rather than the pseudofield, if a pseudofield.
+ *
+ * @param string $fieldName
+ *
+ * @return string
+ */
+ public function getDataTypeForRealField($fieldName) {
+ return CRM_Utils_Type::typeToString($this->getMetadataForRealField($fieldName)['type']);
+ }
+
/**
* If we have a field that is better rendered via the pseudoconstant handled them here.
*