Copy link to clipboard
Copied
Hi, I'm very new at creating Javascript.
I have a drop down selection that goes from numbers 1 to 6.
If the user selects number 1 in the drop-down, I want a Text field box to say a specific text.
To make it easier lets say:
Drop down says 1, Text field says A
Drop down says 2, Text Says B
Dropdown say 3, text says C
It sounds easy but I can't figure it out!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks, that's really helpful. Its all working. I ended up with:
var vDropdown1 = this.getField("Dropdown1").valueAsString;
if (vDropdown1=="Select one") event.value = "";
else if (vDropdown1=="1") event.value = event.value + "TEXT-A";
else if (vDropdown1=="2") event.value = event.value + "TEXT-B";
else if (vDropdown1=="3") event.value = event.value + "TEXT-C";
else if (vDropdown1=="4") event.value = event.value + "TEXT-D";
else if (vDropdown1=="5") event.value = event.value + "TEXT-E";
else if (vDropdown1=="6") event.value = event.value + "TEXT-F";