From: yashodha Date: Wed, 13 Nov 2013 04:44:51 +0000 (+0530) Subject: CRM-13617 - fix linking state province and country in multi-value custom fields X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fdb908969fc17fe1e024f953e2320328711938af;p=civicrm-core.git CRM-13617 - fix linking state province and country in multi-value custom fields --- diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index d2bd512743..775e260391 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1490,6 +1490,13 @@ ORDER BY civicrm_custom_group.weight, CRM_Core_BAO_CustomField::addQuickFormElement($form, $elementName, $fieldId, $inactiveNeeded, $required); } } + if (!empty($form->_stateCountryMap['state_province']) && !empty($form->_stateCountryMap['country'])) { + foreach ($form->_stateCountryMap['state_province'] as $key => $value) { + $stateCountryMap[$key]['state_province'] = $value; + $stateCountryMap[$key]['country'] = $form->_stateCountryMap['country'][$key]; + } + CRM_Core_BAO_Address::addStateCountryMap($stateCountryMap); + } } /**