Skip to main content
jerenatan
Participant
December 7, 2018
Answered

Calculations added in Acrobat Pro DC not saved

  • December 7, 2018
  • 1 reply
  • 1029 views

Hi all,

I recently had to created a form which allows users to give ratings (from 1 to 5) for some questions, and at the end of the form, it adds up the total value of ratings given. After saving the pdf and quitting the program (as I've seen some users said that they face this problem of the calculations not reflecting when the program is still open while they were viewing the pdf, for some reason), I opened the pdf and found that all the calculations added do not reflect when i changed the value of the individual ratings. The text boxes where you input the rating value is editable, but the subtotal and the total value do not reflect at all.

When opening the saved pdf file again in Acrobat Pro, the calculations were no longer there. I've also checked the "Set Fields Calculation Order" and they were all in the correct order.

If the Acrobat Pro app was still opening, while I was previewing the pdf. Whenever I reopen the pdf in the program, the program would crash when I attempt to look in the properties of any text box.

Here are some screenshots I've added to better explain the problem I'm facing.

^ This is what it's suppose to do. All the default values for the blue boxes are set to 3. Every three questions, the subtotal for those questions are calculated. And at the very end, all 7 subtotals add up to the final Total value.

^ For your reference, here are the text box names.

^ Along with the calculations for the subtotal...

^ ...and the final Total Value.

^ This is the "Set Field Calculations Order" window of the pdf.

^ This is the form while previewing it in Acrobat Pro DC

^ And this is the form while previewing it in the "Preview" program. I've also tried viewing it in Safari, Chrome, and Acrobat Reader. All of them do not reflect the calculations.

^ This is after opening the file again in Acrobat Pro, where the calculation option is set to not calculated.

Is anyone facing this problem too?

Thank you.

This topic has been closed for replies.
Correct answer try67

A couple of notes:

- Do not test your form in Apple Preview. It is known to be very buggy and will corrupt a PDF form just by opening it. So that might explain the last issue.

- I would recommend renaming your Rating fields. You see, the "FieldName.1", "FieldName.2", etc., pattern is used internally to denote various copies of the same field, so it might be throwing the application off that you're using it to create individual fields.

Just call them R1, R2, R3, etc.

- If all of the above didn't help, try using a custom calculation script instead of the built-in Sum option.

The code is very simple. For example, for T1 use:

event.value = Number(this.getField("R1").valueAsString) + Number(this.getField("R2").valueAsString) + Number(this.getField("R3").valueAsString);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
December 7, 2018

A couple of notes:

- Do not test your form in Apple Preview. It is known to be very buggy and will corrupt a PDF form just by opening it. So that might explain the last issue.

- I would recommend renaming your Rating fields. You see, the "FieldName.1", "FieldName.2", etc., pattern is used internally to denote various copies of the same field, so it might be throwing the application off that you're using it to create individual fields.

Just call them R1, R2, R3, etc.

- If all of the above didn't help, try using a custom calculation script instead of the built-in Sum option.

The code is very simple. For example, for T1 use:

event.value = Number(this.getField("R1").valueAsString) + Number(this.getField("R2").valueAsString) + Number(this.getField("R3").valueAsString);

jerenatan
jerenatanAuthor
Participant
December 18, 2018

Hi try67,

Thank you for your help! Opening it in Apple's Preview first was the main problem. Thank you so much once again!