This topic is locked

Advanced Search

5/15/2009 3:05:25 PM
PHPRunner General questions
W
wilsonhaze author

I have this problem on my advanced search page, i don't like the way the advanced search page appears by default,

so i tried to modify the page, whenever i remove the checkbox & the notbox field i always get an error , and my search results are not correct.

Below are the codes i took from a single field for example purposes (Year of vehicle)

...So my question is what ways can i make the advanced search work properly.
Before edit

{BEGIN Year_of_Vehicle_fieldblock}Year of Vehicle<INPUT type=checkbox{$Year_of_Vehicle_notbox}>{$searchtype_Year_of_Vehicle}{$Year_of_Vehicle_editcontrol} {$Year_of_Vehicle_editcontrol1}{END Year_of_Vehicle_fieldblock}
After Edit

{BEGIN Year_of_Vehicle_fieldblock}Year of Vehicle{$searchtype_Year_of_Vehicle}{END Year_of_Vehicle_fieldblock}

J
Jane 5/18/2009

Hi,
do you want to remove all controls except search type dropdown box?

W
wilsonhaze author 5/18/2009

Hi,

I want to remove all controls including search type, but i noticed my year field is working properly when i include the search type, if it is possible, i will like to exclude it but if i cant exclude it, then i would like to know how to edit the values in the search type controls fields, maybe reduce it.

Thanks

J
Jane 5/19/2009

Hi,
you can change number of search options in the Search page: Before display event on the Events tab.

Here is a sample:

// write search options

$options="";

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

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

$searchtype = "<SELECT ID=\"SearchOption\" NAME=\"asearchopt_FieldName\" SIZE=1 onChange=\"return ShowHideControls();\">";

$searchtype .= $options;

$searchtype .= "</SELECT>";

$xt->assign("searchtype_FieldName",$searchtype);