Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: ManyMany Grid Field Search Case Sensitive

$
0
0

Hi,

This has been fixed in 3.1, but if you're using 3.0 you can do this quick patch. Note that this will break other databases, which is why we haven't committed it to 3.0.

--- a/forms/gridfield/GridFieldAddExistingAutocompleter.php
+++ b/forms/gridfield/GridFieldAddExistingAutocompleter.php
@@ -195,7 +195,7 @@ class GridFieldAddExistingAutocompleter
// TODO Replace with DataList->filterAny() once it correctly supports OR connectives
$stmts = array();
foreach($searchFields as $searchField) {
- $stmts[] .= sprintf('"%s" LIKE \'%s%%\'', $searchField,
+ $stmts[] .= sprintf('"%s" ILIKE \'%s%%\'', $searchField,
Convert::raw2sql($request->getVar('gridfield_relationsearch')));
}
$results = $allList->where(implode(' OR ', $stmts))->subtract($gridField->getList());


Posted to: ManyMany Grid Field Search Case Sensitive | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles