This topic is locked

How to display advanced search parameters on the List page???

10/17/2008 8:13:48 AM
PHPRunner General questions
B
bozzo author

Somebody knows how to do it????

T
thesofa 10/18/2008

Somebody knows how to do it????


Jane told me

Here are some tips only:

  • all search parameters are in the $_REQUEST array.

    Print all values of this array and select necessary elements:

    ------------------------------

    print_r($_REQUEST);





put print_r($_REQUEST);

in the list page and when you search it will show you the variable names and results, you can then address them thus

lets say you were searching for `event_date` between 2 dates, you will find the dates you entered on the search page like this

$w1=$_REQUEST["value_event_date"];

$w2=$_REQUEST["value1_event_date"];


Then you can add them into a string variable to show by using Echo

$search_params="These are the results from ".$w1." to ".$w2.";";


then just

echo $search_params;


I hope that has helped

hfg 10/20/2008

My users have been asking for this for a while, thanks for the info. I would like to add a question though.
Is there a way to pass this information to the Printer Friendly view? When I put the same code from the Report view (which works nicely) in the Before Display for the Printer Friendly I get the raw text, but no parameters.
My code for both looks like this:
$w1=$_REQUEST["value_Reg_Area_Mgr"];

$w2=$_REQUEST["value_Type"];

$w3=$_REQUEST["value_Community"];

$w4=$_REQUEST["value_Date_Closes"];

$w5=$_REQUEST["value1_Date_Closes"];

$w6=$_REQUEST["value_Manager"];

$w7=$_REQUEST["value_Period"];

$w8=$_REQUEST["value1_Period"];
$search_params="Period(s): ".$w7." to ".$w8." RAM: ".$w1.", Type: ".$w2.", Comm: ".$w3.", Date Closes: ".$w4." to ".$w5." Mgr: ".$w6.";";
echo $search_params;
As I stated it works greater on the report view, (Period(s): January 2008 to Feburary 2008) but on the Printer Friendly I get the text with not parameters (Period(s): to ).
Thanks

T
thesofa 10/20/2008

add each value that you want to move over to printer friendly as a session varible, search here for info on how to do it, then call the asession varibles in the printer friendly view.

hfg 10/20/2008

Thanks again, that was the direction I needed, I have it working.

B
bozzo author 11/15/2008

Hey sofa! you kicks ass man...

thanks a lot.
You seem you are the phpr Master!