+ $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->get('component_mode') == 7)) {
+ $this->addClass('crm-ajax-selection-form');