This topic is locked

advanced search

2/25/2007 1:38:50 PM
PHPRunner General questions
samsp author

hello,
i think i stand on the tube in the moment. please give me a hint. i want to predefine the search options in the advanced search. for example i like to have a field "PRICE" with min and max fields. the option should predefined "between" but hidden. i am sure the solution is not heavy, because i have done that with the normal search option. but in the moment.......!
on the demosite for >properties listing- >Advanced search- you can see that under > Search Criteria- >Price Range.
thank you for helping
samsp

Alexey admin 2/26/2007

Hi,
the easiest way to do this is to modify generated ..._search.php file.

Find this snippet there:

// Price

...

// write search options

$options="";

$options.="<OPTION VALUE=\"Contains\" ".(($opt=="Contains")?"selected":"").">"."Contains"."</option>";

$options.="<OPTION VALUE=\"Equals\" ".(($opt=="Equals")?"selected":"").">"."Equals"."</option>";


and remove all options except BETWEEN.

samsp author 2/27/2007

Hi Alexey,
thank you for the anwer. that is what i have figured out also. it runs. but i like to know how can i hide the optionsfield. in the searchfunction on top of the _list.php i have done that with
"<input type="Hidden" id="ctlSearchOption" value="Contains">".
on the real estate demo site -advanced search site- the option fiels is hidden also. how can i do that. pleas give me a idea.
greetings from spain.
sam

Alexey admin 2/27/2007

Sam,
sure, you can do this, however it's a more complex task.
Replace Select control with Hidden and modify ShowHideControls() in ..._search.php file.

Unfortunatelly we don't have a ready to go solution for this.

samsp author 2/28/2007

hi,
i have found a solution, sure it's a more complex task, but it's looks more designed.
thanks for quick help.
sam