Skip to main content
dennisg26602685
Participant
Mar 21, 2017 9:35 PM UTC
Answered

Fillable pdf form - calculations between fields

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Mar 22, 2017 1:18 PM UTC

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

32 replies

Participant
Oct 17, 2023 10:38 PM UTC

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.

Translate
Thom Parker
Community Expert
Community Expert
Oct 18, 2023 2:31 PM UTC

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);
}

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Oct 18, 2023 4:15 PM UTC

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

Translate
Participant
Feb 3, 2022 5:21 PM UTC

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

Translate
Thom Parker
Community Expert
Community Expert
Feb 3, 2022 5:24 PM UTC

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. 

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Feb 19, 2020 8:46 PM UTC

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. 

Translate
Thom Parker
Community Expert
Community Expert
Feb 19, 2020 9:21 PM UTC

Please start a new thread

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Mar 22, 2017 1:18 PM UTC

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

Translate
dennisg26602685
Participant
Mar 22, 2017 4:33 PM UTC

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

Thank you

Dennis G.

Translate
Known Participant
Sep 16, 2017 8:22 PM UTC

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

Translate