This topic is locked

Default Search Value

7/29/2009 1:58:12 PM
PHPRunner General questions
M
mrphp author

Hi,
I have a database of business phone numbers. When looking for a particular business I use the search bar and enter the name or partial name of the business. Since searches are always by name I would like to change the default value of "any field" in the search bar to "Company" (the name of the company name field). How can this be done? I've reduced the choices to just "Company" but I still have to click the dropdown and choose it.
Thanks for any help.

J
Jane 7/30/2009

Hi,
useList page: Before display event on the Eventstab for this purpose.

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

M
mrphp author 8/5/2009

Hi,

useList page: Before display event on the Eventstab for this purpose.


Hi Jane,
Thanks for your help. I tried what you suggested but it didn't work.

I entered $xt->assign("Company_searchfieldoption","selected");

on the List Page Before Display and it had no effect. Am I right that "FieldName" in your example should be replaced with "Company", the name of my field?

M
mrphp author 8/5/2009



Hi Jane,
Thanks for your help. I tried what you suggested but it didn't work.

I entered $xt->assign("Company_searchfieldoption","selected");

on the List Page Before Display and it had no effect. Am I right that "FieldName" in your example should be replaced with "Company", the name of my field?


Never mind. I reset the list page and then it worked.
Thanks again.