Skip to content
Snippets Groups Projects
Commit 75c4fcec authored by colemanw's avatar colemanw
Browse files

Fix creating Formatting fields in api and UI

parent c1c1e89c
Branches
Tags
No related merge requests found
......@@ -1086,6 +1086,7 @@ SELECT id
*/
public static function getAvailableFieldTitles() {
$fields = self::getAvailableFieldsFlat();
$fields['formatting'] = ['title' => ts('Formatting')];
return CRM_Utils_Array::collect('title', $fields);
}
......
......@@ -2338,6 +2338,11 @@ function _civicrm_api3_api_match_pseudoconstant_value(&$value, $options, $fieldN
return;
}
// Hack for Profile formatting fields
if ($fieldName === 'field_name' && (strpos($value, 'formatting') === 0)) {
return;
}
// Translate value into key
// Cast $value to string to avoid a bug in array_search
$newValue = array_search((string) $value, $options);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment