This topic is locked

Value of default search box on

11/25/2008 3:00:11 PM
PHPRunner General questions
S
sandrotab author

Hello everyone,

in the "List page" as you can 'do to set the default search box "Search for" field on a preset? and how can I do to set the search box with the option "began to"?
Thanks to those who can give me directions

J
Jane 11/26/2008

Hi,
use List page: Before display event on the Events tab for this purpose.

Here is a sample:

$searchfor_attrs="autocomplete=off onkeydown=\"return listenEvent(event,this,'ordinary');\" onkeyup=\"searchSuggest(event,this,'ordinary');\"";

$searchfor_attrs.=" value=\"aaa\"";
$xt->assign("Starts_with_____searchtypeoption"," selected ");

$xt->assign("searchfor_attrs",$searchfor_attrs);

S
sandrotab author 11/26/2008

Hi,

use List page: Before display event on the Events tab for this purpose.

Here is a sample:


Hi and thanks for your answer, but I tried with the code and the system I get the error message "Undefined variable: xt."

The name of the field that I would like to present as a default is NOMINATIVO

the research system by default is that I would like Incomincia per "
I can update the code with an example using these fields by default, so I can understand better?
Thanks for your cooperation.

J
Jane 11/27/2008

What PHPRunner version do you use?

S
sandrotab author 11/29/2008

What PHPRunner version do you use?


I apologize for not knowing how to write well your tongue, but I am Italian. I've been using version PHPr4.2 Build 368. I have bought version 5.0 but I can not use it because it behaves in an unusual way on some SQL code. For example, when I create a Report and try to customize it once you save it does not maintain the custom mode but the move PHPr5.0 fields and columns of the Report in its own way and that is in an uncontrolled way. Also, when I try to put a title that is in the report header, when it runs in the browser often gives me the error and are forced to reset the report with parameters by default. All these problems do not occur PHPr4.2. I hope for a Build later that these problems are solved in order to move to version PHPr5.0 I bought along with WebReport. Otherwise, if having any advice from me for standardizing and make reliable php5.0 version would be much appreciated.
We enclosed a sample SQL code on which the report did not reflect the customization:
SELECT

if(set_ind = 'Auto' or set_ind = 'Danni', 'Assitalia', 'Ina') AS Compagnia,

if(set_ind = 'Auto' or set_ind = 'Danni', Set_Ind, 'Vita') AS Set_Ind,

if(set_ind = 'Auto' or set_ind = 'Danni', Prodotto, Tipo_Premio) AS Prodotto,

SUM(Premio) AS Totale_Premi,

SUM(Premio) / COUNT(Polizza) AS Premio_Medio,

COUNT(Polizza) AS Num_Polizze,

AVG(Durata) AS Durata_Media,

SUM(Premio_Polie) AS Poliennali,

SUM(Pz_Polie) AS Pz_Polie,

SUM(Premio_Tempo) AS Temporanee,

SUM(Pz_Tempo) AS Pz_Tempo,

year(Scadenza) AS Anno_Scad,

month(Scadenza) AS Mese_Scad,

year(Scadenza) - year(now()) AS Durata_Residua,

Tipo_Premio,

Zona,

Cod_Prod

FROM polizze

WHERE Set_Ind <> 'Vita' AND Status = 'Attiva'

GROUP BY Set_Ind, if(set_ind = 'Auto' or set_ind = 'Danni', 'Assitalia', Tipo_Premio), Prodotto

ORDER BY if(set_ind = 'Auto' or set_ind = 'Danni', 'Assitalia', 'Ina'), if(set_ind = 'Auto' or set_ind = 'Danni', Set_Ind, 'Vita'), if(set_ind = 'Auto' or set_ind = 'Danni', Prodotto, Tipo_Premio)

J
Jane 12/1/2008

Hi,
here is the core for PHPRunner 4.2:

$smarty->assign("search_startswith_option_selected"," selected ");

$smarty->assign("search_searchfor"," value='aaa' ");


It's difficult to tell you what's happening in PHPRunner 5.0 without seeing actual files.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.