This topic is locked

Set Search Dropdown defaults in 5.1

9/16/2009 3:56:21 PM
PHPRunner General questions
J
joeb_dfs author

Back in June '08, the following question was asked:
Is it possible to change the default values for the search dropdowns from 'Any Field' - 'Contains' ?
Forum amswered with:
Hi,
use List page: Before display event for this purpose.

Here is a sample code:
Quote
$smarty->assign("search_FieldName","selected");

$smarty->assign("search_equals_option_selected","selected");
best regards,

Jane Endaltseva

e-mail: support@xlinesoft.com
This works in older versions, but not 5.1, which attempts to cahnge $smarty to $xt template. How would this function be accomplished in 5.1 using $xt?

Thanks

J
Jane 9/17/2009

Hi,
here is a sample code for PHPRunner 5.1:

$xt->assign("FieldName_searchfieldoption","selected");

$xt->assign("Equals_searchtypeoption,"selected");
J
joeb_dfs author 10/5/2009

Jane
Sorry I did not get back to right away, I was assigned to another task immediately after, and am now getting back to it.

Thanks for the response, the drop downs are populated, but I should have asked, in addition, I would like to fill the search_for box as well, and cant seem to get that working.

The net result is that I would like the list page to display the selected value only, not the entire file.
Thanks

J
Jane 10/6/2009

Hi,
to pre-fill 'search for' inbox on the list page use List page: Before process event.

Here is a sample:

global $strTableName;

$_SESSION[$strTableName."_searchfor"] = "test";