Skip to main content
dennisg26602685
Participant
March 21, 2017
Answered

Fillable pdf form - calculations between fields

  • March 21, 2017
  • 4 replies
  • 35270 views

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?

This topic has been closed for replies.
Correct answer try67

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...

4 replies

Participant
October 17, 2023

What if I want to have a date entered on a form and then have the next field calculate 15 calendar days and have that date listed. For example, the date a form is submitted to me starts a 15 day waiting period that I need to know the date of.

Thom Parker
Community Expert
Community Expert
October 18, 2023

Dates are handled differently than numbers. They are more complictated.  You'll find lots of scripts for adding days to a date on this forum. It's a common question.

 

Here's an example validation script for the field where the date is entered. 

 

var dtStart =  util.scand("mm/dd/yyyy", event.value);
if(dtStart)
{
      dtStart.setDate(dtStart.getDate() + 15);
      this.getField("NextField").value = util.printd("mm/dd/yyyy", dtStart);
}

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
October 18, 2023

Thank you, Thom. That was extremely helpful and worked like a charm.

Participant
February 3, 2022

I'm trying to subtract one field from the other. In Simplified field notation of the answer field, I'm entering:

1st field-2nd field.

 

I tried including an = before the 1st field. I tried adding = the destination field after the 2nd field. 

 

Nothing seems to work.

 

Help is greatly appreciated!

 

Thank you much.

Anthony

Thom Parker
Community Expert
Community Expert
February 3, 2022

For Simplified Field Notation the field names must not contain spaces or punctuation. Which means you need to change both the field names and the SFN script. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
February 19, 2020

Good afternoon, I am new to this so giving this a try. I am creating a score card and need some assistance on adding some numbers and then diving the total by a set number ranging from 1 to 3. I have attached a photo of what I am referring to. I can add the numbers but having trouble with the division part of it. In summary, it needs to be total score divided by total number of trades (1-3) as noted for an average score. Any help would be much appreciated. 

Thom Parker
Community Expert
Community Expert
February 19, 2020

Please start a new thread

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 22, 2017

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...

dennisg26602685
Participant
March 22, 2017

Thank you so much! Wow – so much simpler than I had been led to believe – very straight forward!

Thank you

Dennis G.

Known Participant
September 16, 2017

I don't have the 'calculate' tab in my Acrobat DC.  Am i missing something??