From fdb908969fc17fe1e024f953e2320328711938af Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 13 Nov 2013 10:14:51 +0530 Subject: [PATCH] CRM-13617 - fix linking state province and country in multi-value custom fields --- CRM/Core/BAO/CustomGroup.php | 7 +++++++ 1 file changed, 7 insertions(+) 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); + } } /** -- 2.25.1