This topic is locked

Drop down menus

7/31/2006 1:10:21 PM
PHPRunner General questions
rsawchuk author

On my Add page, I have a number of drop down menus -- a few show "Please Select" as the default, while the others show a blank even though Please Select is at the top of the list. I would like to have "Please Select" show on all of them.
I have checked the php code and it looks the same for all of the drop down menus. Any ideas on what is causing this problem and how to fix it? Thanks,
Russ

A
amirgulamali 7/31/2006

On my Add page, I have a number of drop down menus -- a few show "Please Select" as the default, while the others show a blank even though Please Select is at the top of the list. I would like to have "Please Select" show on all of them.

I have checked the php code and it looks the same for all of the drop down menus. Any ideas on what is causing this problem and how to fix it? Thanks,
Russ


U might have blank values for some fields in your List of values when u created using the LookUp Wizard..

J
Jane 8/1/2006

Russ,
this issue occurs because the empty in the dropdown is treated as default value.

To fix this you can either enter a dummy value into Default value box on the Edit format dialog on the Formatting tab, or disable the Default values mechanism for dropdown boxes this way:

  • open include/..._functions.php file, find BuildSelectControl function and add following code:
    if ($mode==MODE_ADD)

    $res=NULL;



after this line $res=array_search((string)$data[0],$avalue,true);

and this line $res=array_search((string)$opt,$avalue,true);.

rsawchuk author 8/1/2006

Thanks Jane, I will make the necessary adjustments.
Russ