From a28e436f3a5a00c0865d7b213f728a8d463a2f28 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 3 Sep 2013 15:59:44 +0530 Subject: [PATCH] CRM-13286 fix ---------------------------------------- * CRM-13286: Autocomplete select another contact on registration and contribution pages doesn't set State/Province if contact's country is not the default country http://issues.civicrm.org/jira/browse/CRM-13286 --- CRM/Event/Form/Registration/Register.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index 719fa2d981..719a0a5a5c 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -155,6 +155,11 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $this->_defaults["billing_country_id-{$this->_bltID}"] = $config->defaultContactCountry; } + // set default state/province from config if no state/province set + if (!CRM_Utils_Array::value("billing_state_province_id-{$this->_bltID}", $this->_defaults)) { + $this->_defaults["billing_state_province_id-{$this->_bltID}"] = $config->defaultContactStateProvince; + } + if ($this->_snippet) { // now fix all state country selectors CRM_Core_BAO_Address::fixAllStateSelects($this, $this->_defaults); -- 2.25.1