Lag in Text Field populating Dropdown Field
I am using a validation code to in a text field, which I is to be typed into, to define a dropdown based on said typed in value. When I first started, the pdf would lag and show the options in the dropdown for the case I had just deleted from the typed field. For example, if you look at the code below, if I typed in "VS06", it would show nothing. And then, if I typed in "VS08", it would show the options for "VS06". But, I tried to make some changes, found out they didn't solve my issue, reverted back, and now, nothing is updating at all. Please help.
var A = this.getField("Model #").value; //gets model number
var B = A.substr(0,4); //isolating size
switch (B){ //selecting size
default:
thisField("DHT CV Line").setItems(["nothing", "more nothing"]);
break;
case "VS06":
thisField("DHT CV Line").setItems(["6","st"]);
break;
case "VS08":
thisField("DHT CV Line").setItems(["8","st"]);
break;
case "VS10":
thisField("DHT CV Line").setItems(["10", "st"]);
break;
case "VS12":
thisField("DHT CV Line").setItems(["12", "st"]);
break;
}
