This topic is locked

adv search 'drop downs'

7/24/2009 3:01:59 PM
PHPRunner General questions
D
diaster author

I wanted the make the form simple to fill out. I eliminated the dropdown code and replaced with fieldtype=hidden fieldname=field1 fieldinput=contains, <--- may be not exactly that way, thing is i used the correct syntax and the fields went away but my searches returned all data and the revealed the second hidden fields that cross compare with the first fields.

what i would like to do is have only three search criteria in advanced search. eliminate the drop downs with hidden fields for contains and equals (for date and zip) fields. then they just fill out the input box and hit submit. in search for i would like too just have "any condition" with no options to pick(hidden) any ideas?

J
Jane 7/27/2009

Ted,
To remove all search options (except Equals for example) on the advanced search page use following code in the "Search Page: Before display" event on the Events tab:

// write search options

$options="";

$options.="<OPTION VALUE=\"Equals\" selected>"."Equals"."</option>";

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

$searchtype .= $options;

$searchtype .= "</SELECT>";

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


where FieldName is your actual field name.
Also you can remove dropdown with search options on the list page (simple search) on the Visual Editor tab.