Skip to main content
Apr 3, 2017 6:06 PM UTC
Question

Text Field Custom Calculation Script Won't Save/Stay Selected

I have a Text field named "MyField". I'd like to add a Custom Calculation Script to it. Every time I select the edit, enter the code, and then click OK, it does not save the code and then reselects the default "Value is not calculated" option. It will even happen in fields that I have already saved previously and that did once work. When returning to them sometimes, I will see the selection change from "Customer Calculation Script" to "Value is not calculated" as soon as I activate that Calculate tab. Does anyone have any idea what causes this and/or how to avoid/correct it. I have tried searching all over Google and can't seem to find anyone else that has brought up this issue.

18 replies

JR Boulay
Community Expert
Community Expert
Mar 29, 2025 11:23 AM UTC

[MOVED TO THE ACROBAT DISCUSSIONS]

Translate
Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
Apr 3, 2017 7:04 PM UTC

Yes, I've experienced it as well. Mostly when using one of the built-in functions for calculation/validation/keystroke/etc.

The code usually works, although it's not displayed in the window, though.

Translate
Apr 3, 2017 7:52 PM UTC

Yeah, I was hoping it would still work, but it doesn't seem to. It does appear to happen more often when I have multiple files open that share the same field names but are not actually connected... That is not *always* the case, though... I don't think.

Translate
Thom Parker
Community Expert
Community Expert
Apr 3, 2017 6:41 PM UTC

I've had the same thing happen before.

Are you using the default JS editor or an external editor? And does the doc contain a large number of related fields?

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Apr 3, 2017 7:45 PM UTC

This is while in the form through the text field properties.

Translate
try67
Community Expert
Community Expert
Apr 3, 2017 7:51 PM UTC

Huh? This doesn't really answer any of the questions asked above...

Translate