Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Problem with drop down list

Avatar

Level 4

 

Good afternoon all,

I am having problem with the following code. I have 3 items in a drop down list, which should only allows custom entry if only "other" which is the item values of 3 is selected from the drop down. The code works okay for every other  items, and will clear the drop down list, but does not allow the user to enter/type in other values. I need it to allow the user to be able to enter other value if item 3 is selected.

Please I need help with the code below,

On Exit event;

 

if (DropDownList1.rawValue=="1"){

DropDownList1.rawValue="g";

}

else if (DropDownList1.rawValue="2"){

    DropDownList1.rawValue="p"

}

else if (DropDownList1.rawValue=="3"){

   DropDownList1.rawValue=null;

  xfa.host.setFocus(DropDownList1);

}

Thanks

v/r

Tammy

2 Replies

Avatar

Level 7

try this:

if (DropDownList1.rawValue==1){

DropDownList1.rawValue="g";

}

else if (DropDownList1.rawValue==2){

    DropDownList1.rawValue="p";

}

else if (DropDownList1.rawValue==3){

   DropDownList1.rawValue="";

   DropDownList1.resolveNode("ui.#choiceList").textEntry = "1";

  xfa.host.setFocus("DropDownList1");

}