*/
function buildQuickForm() {
parent::buildQuickForm();
- $this->addClass('crm-ajax-selection-form');
CRM_Core_Resources::singleton()
// jsTree is needed for tags popup
->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
$this->addTaskMenu($tasks);
}
- if ($qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues)) {
+ $selectedContactIds = array();
+ $qfKeyParam = CRM_Utils_Array::value('qfKey', $this->_formValues);
+ // We use ajax to handle selections only if the search results component_mode is set to "contacts"
+ if ($qfKeyParam && $this->get('component_mode') <= 1) {
+ $this->addClass('crm-ajax-selection-form');
$qfKeyParam = "civicrm search {$qfKeyParam}";
$selectedContactIdsArr = CRM_Core_BAO_PrevNextCache::getSelection($qfKeyParam);
$selectedContactIds = array_keys($selectedContactIdsArr[$qfKeyParam]);