Change sort order for view when exposed filter text field submitted

by fallenturtle   Last Updated June 30, 2020 02:07 AM

I have a view that by default is ordered by date. It has several exposed filters one of which is for filtering by text (we use it as a search field). I'd like the view sort to change to Relevance when a user submits a search but I also want to set it so it only does this once in case the user changes the sort order and then modified their search string. Is this possible? I'm using Better Exposed Filters, fwiw.

Tags : 8 views


Related Questions


Alter the moderation state in the Content view Drupal 8

Updated February 28, 2018 21:07 PM


Group items in Views by value in Field Collection

Updated July 20, 2015 13:03 PM

List of referenced entities appended to a node

Updated January 12, 2017 08:03 AM