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

Problems with programming form including calculations

Engaged ,
Feb 18, 2024 Feb 18, 2024

I am putting together a form that will be fillable and saved using Acrobat Reader. It is also going to have some simple calculations. First problem is in the process of naming the fields and taking the spaces from between words out, when I tab to rename the tool tip to match the field name the program changes to another field in the form. The second problem is the totalling of dollar amount to the Amount field. I have formatted it to show 2 decimal places and have $ sign for currency. When I select the Amount field and go to Calculate and select sum + and pick all the fields to be added together and then select Close, the program says I don't have a field named Gold$32 and I don't. The correct field name is in my screen shot I am attaching showing all fields. Any help would be greatly appreciated. Thanks

TOPICS
PDF , PDF forms
806
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
1 ACCEPTED SOLUTION
Community Expert ,
Feb 18, 2024 Feb 18, 2024

The built-in "Sum" calculation uses a script to parse the fields and perform the calculation. This script is very sensitive to field names. I would suggest removeing special characters (punctuation) and spaces from all field names that are used in the calculation.  It is the "," that is causing the issue. 

I would further suggest removing all field formatting until the calculations, and all other interactivity is working properly.  Formatting should be the last thing that is applied to the fields, after you know it's working correctly. 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

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 ,
Feb 18, 2024 Feb 18, 2024

The built-in "Sum" calculation uses a script to parse the fields and perform the calculation. This script is very sensitive to field names. I would suggest removeing special characters (punctuation) and spaces from all field names that are used in the calculation.  It is the "," that is causing the issue. 

I would further suggest removing all field formatting until the calculations, and all other interactivity is working properly.  Formatting should be the last thing that is applied to the fields, after you know it's working correctly. 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Engaged ,
Feb 18, 2024 Feb 18, 2024

Thanks Thom,

Would those characters also cause the fields to change when tabbing to the tool tips? Once everything is working correctly and it is saved as an extended PDF, the person will be able to download, fill and save and then attach it to an email. Is that correct?

Thanks, John 

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 ,
Feb 18, 2024 Feb 18, 2024
LATEST

Yes, that is correct, but I don't think you need to save it as extended. Many of the rights that are provided by the Reader Extension are now built-into Reader. 

I do not believe those special characters would have any affect on tabbing to the tooltips. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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