Populate a text field with the same content (not value) of a dropdown list
Hi. I have a dropdown list "Dropdown1" with some values that show the relative content, for example:
- value = 0 shows " "
- value = 1 shows "abc"
- value = 2 shows "def"
- value = 3 shows "ghi"
Now, I have a text field "Text1". I would like that when I select a value in the list, this populates the text field with the same content. I know I can use this calculation script in "Text1":
var f = this.getField("Dropdown1");
if (f.valueAsString=="0") event.value = " ";
else if (f.valueAsString=="1") event.value = "abc";
else if (f.valueAsString=="2") event.value = "def";
else if (f.valueAsString=="3") event.value = "ghi";
but if if I allow to customize the text of the selection of the dropdown list, this change (rightly) does not appear in the text field. I would like to work around the problem and impose that the content (and not the value) that appears in the list, appears identical even in the text field. Thanks
