Copy link to clipboard
Copied
I am trying to create a mileage sheet for the various places we have to travel to. I have a drop-down box created with each location. I am trying to have a text box populated with the set mileage and total expense depending upon which location is selected automatically. I have highlighted the fields I am working on. Is this possible?
Copy link to clipboard
Copied
Disregard found the correct formula...
var selectedPackage = this.getField("Destination").value;
if (selectedPackage=="Total Miles") event.value = "172.4";
else if (selectedPackage=="Total Miles") event.value = "76.2";
else if (selectedPackage=="Total Miles") event.value = "25.4";
Copy link to clipboard
Copied
Disregard found the correct formula...
var selectedPackage = this.getField("Destination").value;
if (selectedPackage=="Total Miles") event.value = "172.4";
else if (selectedPackage=="Total Miles") event.value = "76.2";
else if (selectedPackage=="Total Miles") event.value = "25.4";
Copy link to clipboard
Copied
Good day, I am trying to do similar thing, and there is a hyperlink within the text. Is there any way to add hyperlink to the website?
else if (selectedPackage=="Hose and Strainers") event.richValue = [{text: "ITEM SPECIFICATIONS\n\n", fontWeight: 800},
{text: "3 Inches Hoses • 3 inch Semi Rigid Suction Intake Hose\n"},
{text: " Please visit www.test123.com for details"}
Copy link to clipboard
Copied
Here's an article on exactly this topic:
https://acrobatusers.com/tutorials/change_another_field/
You'll find some gereral info on scripting dropdowns/lists here:
https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm