Fix Country => State hierarachical select broken in 4.7 branch
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 11 Sep 2015 06:29:52 +0000 (11:59 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 11 Sep 2015 06:29:52 +0000 (11:59 +0530)
CRM/Core/Form.php

index a68d70e3a63d55cea6e9977438d4a1c3f228b129..69e20b624e15df827d74c755221b0558fb47e9bf 100644 (file)
@@ -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);