Is there an option to enable %keyword% search by default... if not which files to edit?
Announcement
Collapse
No announcement yet.
Option to enable %keyword% search by default
Collapse
X
-
It would be nice to have an option to prefix the % in the search as option indeed as suggested below.
---------------------------
From the Espocrm.com customer portal documents/tips section :
Open file application/Espo/Controllers/GlobalSearch.php
Find:
$query = $request->get('q');
Add content below:
$query = trim($query, '%');
$query = '%'. $query .'%';
Do the initial trim in case someone has already added the wildcard to the beginning or end, since this makes it a global wildcard.
You can also do it on the record list as well by making the very simple change below.
Open file application/Espo/Core/SelectManagers/Base.php
Go to line 1248 and change...
$expression = $textFilter . '%';
to
$expression = '%'. $textFilter . '%';
- Likes 1
Comment
Comment