Copy link to clipboard
Copied
I'm probably way out of my league here, but here's what I need to happen:
I have a fillable pdf with several checkboxes that would result in an amount being added to a total field (Ex: Full page ad / Exhibitor fee is $500 / Non exhibitor fee is $750), so the user selects two items (or none). If they check "Full page ad" checkbox, then they select whether or not they are an exhibitor, then the amount ($500) would go to the total field = $500. And several more optional add choices, etc.
So, I guess my question(s) are:
If a checkbox is selected, can a number populate in a separate field? And if so, how?
I am a javascript beginner, have only completed the calculations that were simple.
Many thanks in advance for help/advice.
Then use this:
event.value = 0;
if (this.getField("fullpageexhibitor").value!="Off") event.value=500;
else if (this.getField("fullpageadregular").value!="Off") event.value=700;
Copy link to clipboard
Copied
I have a similar issue... this is the code im trying to use, Im trying to get a check box in adobe to (When checked) to subtract "TTLCalculated" And use that value in the next part of my code, wanted to know if what im doing wrong, im a newbie to javascript, would really appreciate the help!
var DA = Number(this.getField("Downpayment*").valueAsString);
var DA2 = Number(this.getField("TTLCalculated").valueAsString);
event.value = (DA-DA2);
if (this.getField("TTLCalculated").value!="Off") event.value=(DA-DA2);
else if (this.getField("TTLCalculated").value!="Off") event.value=0;
Copy link to clipboard
Copied
YOu have exactly the same condition in both parts of the if block. Remove the second if. Just use an else.
Copy link to clipboard
Copied
Hello,
I am trying to do something similar. I have a specific rate that gets calculated on top of the total amount. However, the payment type changes the rate.
At the moment All payment types has a rate of 8.42% added to the total amount which is annotated in the G&A (named 5 on the PDF) i have added using the simplified filed notation which is TOTAL_COST * 0.0842, this will happen regardless the payment type. However, for three payment types its 7.67% added cost and one is 9.55% added cost. How do I have the specific rate calculation work with the specific payment type selected?