assign('rows', $this->get('rows')); $this->_params = $this->controller->exportValues($this->_name); } public function buildQuickForm() { $config = CRM_Core_Config::singleton(); $this->add('select', 'country_id', ts('Country'), array('' => ts('- select -')) + CRM_Core_PseudoConstant::country() ); $countryID = isset($_POST['country_id']) ? $_POST['country_id'] : NULL; if (!$countryID) { $countryID = isset($this->_params['country_id']) ? $this->_params['country_id'] : NULL; } if ($countryID) { $this->add('select', 'state_province_id', ts('State'), array('' => ts('- select a state -')) + CRM_Core_PseudoConstant::stateProvinceForCountry($countryID) ); } else { $this->add('select', 'state_province_id', ts('State'), array('' => ts('- select a country first -')) ); } $stateCountryURL = CRM_Utils_System::url('civicrm/ajax/jqState'); $this->assign('stateCountryURL', $stateCountryURL); $this->addButtons(array( array( 'type' => 'refresh', 'name' => ts('Search'), 'isDefault' => TRUE, ), array( 'type' => 'cancel', 'name' => ts('Cancel'), ), ) ); } public function postProcess() { $this->_params = $this->controller->exportValues($this->_name); CRM_Core_Error::debug($this->_params); CRM_Utils_System::civiExit(); } }