Copy link to clipboard
Copied
Can a dropdown item in its list supply a value to another text field in the document?
Copy link to clipboard
Copied
Yes, using a script.
Here's the basic code to do it (to be used as the custom validation script of the drop-down):
if (event.value=="Option 1") this.getField("Text1").value = "Some text for option 1.";
else if (event.value=="Option 2") this.getField("Text1").value = "Some text for option 2.";
Copy link to clipboard
Copied
Yes and a very basic script can do it. Dropdowns and list items can have two values, the "Item" which gets displayed to the user in the list and the "Export Value" which is the actual value of the field when that item is selected. If you wanted another field to show Canis lupus familiarise when Dog is selected from the list, just set the Export Value like below then add a custom calculation script to the other field that copies the Export Value of the list box. Like this...
event.value = this.getField("listFieldName").value