From: jitendrapurohit Date: Fri, 11 Sep 2015 06:29:52 +0000 (+0530) Subject: Fix Country => State hierarachical select broken in 4.7 branch X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7e90c13a880e420df4d7a3d08181b3d915d29b57;p=civicrm-core.git Fix Country => State hierarachical select broken in 4.7 branch --- diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index a68d70e3a6..69e20b624e 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1401,6 +1401,9 @@ class CRM_Core_Form extends HTML_QuickForm_Page { if (empty($props['multiple'])) { $options = array('' => $props['placeholder']) + $options; } + if (!empty($props['data-api-field']) && (in_array($props['data-api-field'], array('state_province_id', 'county_id')))) { + return $this->addChainSelect($name, $props); + } // TODO: Add and/or option for fields that store multiple values return $this->add('select', $name, $label, $options, $required, $props);