Skip to content

Commit

Permalink
Fix autocomplete search if contact id plus display fields are selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrapurohit committed Nov 12, 2023
1 parent ab58847 commit dbeca9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ContactComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function wf_crm_contact_search($node, $element, $params, $contacts, $str = NULL)
if ($str) {
$searchFields = [];
foreach ($display_fields as $fld) {
if ($fld == 'id' && !is_numeric($str)) {
continue;
}
$searchFields[] = [$fld, 'CONTAINS', $str];
}
$params['where'][] = ['OR', $searchFields];
Expand Down

0 comments on commit dbeca9a

Please sign in to comment.