Page 1 of 1

Disable SearchType option

Posted: Sun Sep 01, 2013 8:34 pm
by stavfx

Hi, i want to make the Search only go by "Exact phrase" and not have the option for "All words" or "Any word".
how do i go about doing that?

thanks,
Stav;


Re: Disable SearchType option

Posted: Mon Sep 02, 2013 10:32 am
by danielc

Use jQuery to hide the radio button


Re: Disable SearchType option

Posted: Mon Sep 02, 2013 11:46 am
by mobhar

Hiding the options using jQuery won't disable the functionality of the other search options in the Basic/Quick Search. The closest approach is by customizing the template file. See the related code in the "list-script-search.php" file.


Re: Disable SearchType option

Posted: Tue Sep 03, 2013 8:16 pm
by SouzaRM

(Sorry my bad english)

Dear StavFx,

In my initial and humble knowledge:


In [Client scripts --> Global --> StartUp Script]
$("#xsr_2").remove();


I know I There is the option: [PHPMaker --> Table --> Search --> Default search type (Quick) --> Exact match | All words | Any words],
BUT do not trust due to session cookies that are stored (would need clear your browser to take the standard value between the sessions).

THEN I change the snippet at hand: [ $this->BasicSearch->Type = "="; ]

In (...)list.php:

(...)
// Load basic search values
function LoadBasicSearchValues() {
$this->BasicSearch->Keyword = @$GET[EW_TABLE_BASIC_SEARCH];
if ($this->BasicSearch->Keyword <> "") $this->Command = "search";
// $this->BasicSearch->Type = @$
GET[EW_TABLE_BASIC_SEARCH_TYPE];
$this->BasicSearch->Type = "="; <------------------------------------------------------------------------------------------------------------------
}
(...)

Good luck...


Re: Disable SearchType option

Posted: Sun Sep 08, 2013 4:56 pm
by stavfx

thanks a lot! :)