This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jfo
jfo

Hi,

I'm struggling to figure out how to override the default search (on list search, recordfinder widget, relation widget, ...).

Let's suppose I have a list displayed on a recordfinder with the following items:

id       name
1        AN ITEM ON THE 1ST POSITION
2        2ND ITEM AFTER THE 1ST ONE
3        1ST ITEM THAT COMES AFTER THE SECOND ITEM IS THE THIRD ITEM
4        ANOTHER ITEM - CONTAINING THE EXPRESSION 1ST ITEM BUT NOT AT THE BEGINNING

If a user types 1ST ITEM all four records are filtered and visible because all of them contain the tokens 1ST and ITEM.

What I need to achieve is: when a user types 1ST ITEM only the third record 1ST ITEM ... is displayed - because is the only one actually starting with the typed search term.

How could I customize/extend the data model - or the search widget - for use the whole search term instead of search for records containing its parts?

Last updated

axomat
axomat

Recordfinder has a new option "searchMode" which you need to set to a value of "exact"

Only available in the latest dev release.

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.