Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with custom calculation scripts please.

Explorer ,
Aug 19, 2020 Aug 19, 2020

My form uses a bunch of custom calculation scripts and it works as desired, but once I save it, those custom calculation scripts stop functionaing. Can someone please explain to me how to make it so, regardless of saving the PDF document, the custom calculation scripts continue to function. 

TOPICS
Acrobat SDK and JavaScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2020 Aug 19, 2020

How are you saving it, exactly? How did you create it? Where are you viewing it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 19, 2020 Aug 19, 2020

How are you saving it, exactly? Either via CTRL S or file | save. 
How did you create it? You helped me with some of the scritping. 

Where are you viewing it? In Adobe Acrobat DC. 

 

Would it be easyest to temp upload it for you to take a look at? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2020 Aug 19, 2020

Yes, if you can do that it would be good.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 19, 2020 Aug 19, 2020
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2020 Aug 19, 2020

I don't see any calculated fields in this file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 19, 2020 Aug 19, 2020

Odd, most of the boxus starting from: Number and Street Address and below almost all have them, all based on what is selected from Dropdown1? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2020 Aug 19, 2020

The code is there, but you'll notice that no fields appear in the Set Fields Calculation Order dialog, which means that something is wrong with the file. Did you at any point edit the code using the Edit All JavaScripts command, by any chance?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2020 Aug 20, 2020

No, I wasn't even aware of that command. lol 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

How did you create the fields?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2020 Aug 20, 2020

In prepare form. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

That's fine. The issue might be with the file itself, then. I see that it was created using something called PDFEscape, which is an online service. My guess is it did not do a very good job of creating the PDF file.

I would try creating the file from scratch in Acrobat. For example by inserting it as the background of a new file, and then adding the fields to it again. It will take some work, but it will probably result in a better file at the end.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2020 Aug 20, 2020

I used the PDFescape to shrink it in size. That may have broke it? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

Yes, very likely.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 20, 2020 Aug 20, 2020
LATEST

If I recopy and paste each code in. It works, until saved. Seems odd. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines