Copy link to clipboard
Copied
I am using Adobe Acrobat Pro DC. I am creating a pdf fillable form, which contains fields for areal space measurements. I would like to multiply two fields (variable values), divide the result by a set value number and have that result displayed in a separate field to reflect number of acres in the area. For example: length X width / 43,560 = #Acres
Can anyone advise please as to what script/formula to use for this fillable adobe form?
Copy link to clipboard
Copied
Let's say the fields are called "Length", "Width" and "Acres".
Under the Calculate tab of Acres select the second option "Simplified field notation", and then enter this formula:
Length * Width / 43560
That's all there is to it...
Copy link to clipboard
Copied
Let's say the fields are called "Length", "Width" and "Acres".
Under the Calculate tab of Acres select the second option "Simplified field notation", and then enter this formula:
Length * Width / 43560
That's all there is to it...
Copy link to clipboard
Copied
Thank you so much! Wow – so much simpler than I had been led to believe – very straight forward!
Thank you
Dennis G.
Copy link to clipboard
Copied
I don't have the 'calculate' tab in my Acrobat DC. Am i missing something??
Copy link to clipboard
Copied
Are in "Prepare Form" tool?
Copy link to clipboard
Copied
Yes, i found that finally. Now i have dropdown box A (titled 'select personal annual pass option) and trying to populate the items in dropdown list A to prices in textbox A. I have input the following but keep getting syntax error. Can you tell me where I'm going wrong?
event.value=this.getField(select personal annual pass option).value;
adult
spousal
etc.....
i have entered export values in the dropdown list and commited selected value immediately.
Copy link to clipboard
Copied
You must put the field name between double-quotes:
event.value=this.getField("select personal annual pass option").value;
Copy link to clipboard
Copied
THANK YOU try67!!
Copy link to clipboard
Copied
Hello (again),
I have now added a QTY column and have input the following but am getting an error saying that the value entered does not match the format of the field.
event.value = this.getField("Personal Annual Pass Option")*("QTYRow1").value;
i have several options under the drown down box and then the Qty bos and then my 'total box'.
Can you please tell me what i've done wrong?
Thanks so much!
Copy link to clipboard
Copied
Your code is not quite correct... Use this:
event.value = Number(this.getField("Personal Annual Pass Option").value) * Number(this.getField("QTYRow1").value);
Copy link to clipboard
Copied
I'm still getting the same error. Do the list in my dropdown box are not numbers. Does that make a difference? Arrrrrgh!@
Copy link to clipboard
Copied
What i meant to say is the dropdown box is several items that are not numeric values.
Copy link to clipboard
Copied
You must use numeric values as the export values of the items in the drop-down for it to work.
Copy link to clipboard
Copied
OH MY.... I JUST RESET THE 'SET FIELD CALCULATION ORDER' AND IT WORKED!!!!!
YOU ARE SOOOOO AWESOME! YOUR ANSWER IS CORRECT!!
THANK YOU THANK YOU THANK YOU. I have been struggling with this form for days now.... not to mention everyone keeps adding to and changing it!!!
Thanks again
Copy link to clipboard
Copied
Whoops.... now i keep getting this error:
any suggestions on what i've done wrong? Each item on the list IS associated with export values. Just when i thought i was good to go!
Copy link to clipboard
Copied
Change the field's Format to None and try again. The result will probably be something like NaN, though, which means you have a non-numeric value somewhere, still.
Copy link to clipboard
Copied
It seems to calculate out okay, BUT if i go back to correct or choose another list in the dropdown i still get that message and my numbers won't change or revert back to 0.
I'm so lost on this now. Thanks so much for all your help try67
Copy link to clipboard
Copied
If you can share the file I'm happy to take a look at it.
Copy link to clipboard
Copied
Can i message you somewhere that is not public?
Copy link to clipboard
Copied
Now I'm quite frustrated. I'm entering into another drop down box and am getting the same message and it doesn't even pertain to the drop down i'm currently editing.....
Copy link to clipboard
Copied
That's to be expected. Any change of value in any field will trigger all
the calculations in the entire form.
Copy link to clipboard
Copied
You can email me at try6767 at gmail.com.
Copy link to clipboard
Copied
I am in Prepare Form...I think. I can't get the calculate option and number is not one of my fild options. I have text, signature, date etc.
Copy link to clipboard
Copied
This was extremely helpful! I have a follow-up for something related. I am multiplying a drop down value (Entire) which is a number of days, by $3500.00 and displaying the result in a field called Total. I get the correct dollar amount showing in the Total field when I hit the enter key. If I use the tab key though, the focus goes to the Total field and the value becomes just a number. for example, if I choose 2 days and hit enter, the value in the Total field is correctly, $7,000. When I tab to Total, the number becomes 7000. Then when I tab to the next field, Total returns to $14,000. Is there way to prevent the displayed dollar amount from changing to a regular number at all? Hope this makes sense. Thanks.
Copy link to clipboard
Copied
Set the field as read-only. It will take it out of the tab order and will make sure it only shows the calculated value, in the desired format.


-
- 1
- 2