This topic is locked

Advanced Search - Limit search type & Clear fields

5/29/2008 5:00:51 PM
PHPRunner General questions
L
Lisa2006 author

Hi Forum,
TABLE: journey

FIELDS: town, city, country
I've got the following questions based on the 'Advanced Search' feature.



1] When the user clicks on the 'Advanced search' button, any previously entered data is still held. How can i clear the fields?

2] How can i limit the search type options available to only - Contains, Equals, Equal or less than ...

3] How do i remove the 'NOT' column and 'Any condition' radio button
Thanks in advance
Lisa

J
Jane 5/30/2008

Hi,
please see my answers below:

  1. check following thread:

    http://www.asprunner.com/forums/index.php?...amp;hl=advanced
    2,3. edit advanced search page on the Visual Editor tab manually for that.

L
Lisa2006 author 5/30/2008

Hi Jane,
Points 1 & 3 resolved.
However, i'm struggling to resolve point 2. When user clicks 'Advance Search' and get presented with there search options, I only want to display the following in the drop down list:

Contains

Equals

Equal or less than ...
I cannot see a way via Visual editor to remove the unwanted search options. i.e. starts with ..., more than ...., etc.
I've looked through the HTML code and cannot find the wording Contains, Equals, Equal or less than ...
Please Help
Lisa

J
Jane 5/30/2008

Hi,
sorry for my fault.

You need to edit generated ..._search.php file to remove unnecessary search options.

T
thecomputerguy 6/18/2009

Hi,

sorry for my fault.

You need to edit generated ..._search.php file to remove unnecessary search options.


How can I hide fields from the Advance search based on a Group Security login?

Or even do not show the advance edit at all.
Any ideas?

Thank you,
Andrew

J
Jane 6/19/2009

Andrew,
use Search page: Before display event on the Events tab for this purpose.

Here is just a sample:

if ($_SESSION["UserID"]=="admin")

$xt->assign("FieldName_fieldblock",true);

else

$xt->assign("FieldName_fieldblock",false);