Merge pull request #19225 from colemanw/select2Tweak
[civicrm-core.git] / CRM / Core / BAO / CustomValue.php
index 3a64cdb29d3b57c3f1a09e9120664b726c1433ae..555077b0428c190e93c682eec1395a860316373b 100644 (file)
@@ -175,6 +175,9 @@ class CRM_Core_BAO_CustomValue extends CRM_Core_DAO {
       ) {
         $formValues[$key] = ['LIKE' => $formValues[$key]];
       }
+      elseif ($htmlType == 'Autocomplete-Select' && !empty($formValues[$key]) && is_string($formValues[$key]) && (strpos($formValues[$key], ',') != FALSE)) {
+        $formValues[$key] = ['IN' => explode(',', $formValues[$key])];
+      }
     }
   }