Copy link to clipboard
Copied
Hello all,
I currently have a dropdown menu with the following options: FHA, USDA, VA, Uninsured, FNMA, Conventional Insured. What I need is a script that based on the selection from the dropdown, it will take information from another field in the form (UPB) and multiply it by a specific number (the numbers are different based on the dropdown selections). Is there a way to create a script to achieve this?
I only know what I've learned from poking around in acrobat myself--any help would be greatly appreciated!
Copy link to clipboard
Copied
You can use something like this as the custom calculation script of the target field (change the name of the drop-down in line #1 and the values as needed, of course):
var s = this.getField("Dropdown1").valueAsString;
var v = Number(this.getField("UPB").valueAsString);
if (s=="FHA") event.value = 5 * v;
else if (s=="USDA") event.value = 10 * v;
// etc.
else event.value = "";
Copy link to clipboard
Copied
This worked perfectly, try67! Thank you so much! ~