Copy link to clipboard
Copied
I have a dropdown with multiple choices, and each choice has its own value text used to calculate an answer in another field, but I need to return the display text in a different field. Can anyone help, please?
As custom calculation script of field where you want to show display text use this and rename dropdown field name to your actual field name:
var f = this.getField("Dropdown1");
var a = f.currentValueIndices;
var x = f.getItemAt(a, false);
event.value = x;
Copy link to clipboard
Copied
Hi Jsand
Hope you are doing well and sorry for the trouble. The workflow that you are trying to achieve is might be possible using the JavaScript.
For more information about using the JavaScript please check the help page https://acrobatusers.com/tutorials/javascript_console/
Hope this information will help
Regards
Amal
Copy link to clipboard
Copied
Thanks Amal!
Copy link to clipboard
Copied
The event.value property, accessed in the drop-down's own Validation event, will return the display value of the selected item.
Copy link to clipboard
Copied
As custom calculation script of field where you want to show display text use this and rename dropdown field name to your actual field name:
var f = this.getField("Dropdown1");
var a = f.currentValueIndices;
var x = f.getItemAt(a, false);
event.value = x;
Copy link to clipboard
Copied
You are now my most favorite person on the planet! It is exactly what I was looking for, Thank You so much and I hope you have a wonderful day!