Commit 6d95a1d9 authored by bgm's avatar bgm Committed by Aegir user
Browse files

StateProvince custom fields: fix issue with empty values on form process

parent 4fb2b6ca
......@@ -250,6 +250,14 @@ class CRM_Activityprofile_APIWrappers_Profile {
}
elseif ($val['data_type'] == 'StateProvince') {
$val['html_type'] = 'Select';
if (empty($val['options'])) {
// Works for a StateProvince custom fields on a case or activity
$val['options'] = civicrm_api3('Activity', 'getoptions', [
'field' => $val['name'],
])['values'];
}
$val['options'] = [0 => ts('- select -')] + $val['options'];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment