This topic is locked

Default Value in Advance Search

10/17/2008 8:52:57 AM
PHPRunner General questions
E
ematica author

Hello.

i want to show default value of dropdown menu in Advance Searh.

Best Regards.

J
Jane 10/20/2008

Hi,
use following code in the Search Page: Before display event on the Events tab:

global $control_FieldName;

$control_FieldName["params"]["value"]="value";

E
ematica author 10/20/2008

Hi,

use following code in the Search Page: Before display event on the Events tab:


Sorry, but i need more help.

for example if i have lookup wizard "fruit" and in advance search i want to show coconut as default.
Fuit ====> banana

coconut

cherry
global $control_Fruit;

$control_Fruit["params"]["coconut"]="coconut"
It´s ok? don´t work for me.
Best Regards.

J
Jane 10/20/2008

This code works on my test box.

Please make sure you have applied changes correctly. Field names are case sensitive here.
If it doesn't help publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

E
ematica author 10/20/2008

Thanks for the reply Jane!

Some pictures to give you some idea of the proyect.






There is another way to make that? like edit "***_search.php" ??

Best Regards.

L
laonian 10/20/2008

Sorry, but i need more help.

for example if i have lookup wizard "fruit" and in advance search i want to show coconut as default.
Fuit ====> banana

coconut

cherry
global $control_Fruit;

$control_Fruit["params"]["coconut"]="coconut"
It´s ok? don´t work for me.
Best Regards.



ematica,
you should use Jane's code like this:
global $control_Fruit;

$control_Fruit["params"]["value"]="coconut"
Good luck.

E
ematica author 10/20/2008



ematica,
you should use Jane's code like this:
global $control_Fruit;

$control_Fruit["params"]["value"]="coconut"
Good luck.


Thanks alshine
I use this code, but still don´t work..

L
laonian 10/20/2008

Thanks alshine

I use this code, but still don´t work..


ematica,
Please make sure you have set up the lookup relation correctly. It should be something like:
Table1
Field1

Field2

...

Fruit

...
Table2
Field_1

Field_2

Field_3

...

Fruit_list

...
Select Table2 as your reference table for Table1 Fruit lookup, and Fruit_list field as link field and display field. From your post, it seems to me that you were making the lookup from within its own table (Fruits to Fruits or Table1 to Table1 in this example). This is perhaps why it does not work. Good luck.

E
ematica author 10/21/2008

Thanks Again, i try many diferents ways, but i can´t do it.
how can i make default value in advance search, but as "text field", or "List of Values" and not as lookup table.
Best Regards.

J
Jane 10/22/2008

Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.