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

Downloadable PDF form with calculations

Engaged ,
Feb 14, 2024 Feb 14, 2024

I have put together a PDF form that will be on a website for download and want to have some calculations for ticket purchasing. Can this be done on a downloadable form and if so is there a tutorial for adding the calculations?

 

Thanks,

John

TOPICS
How to , PDF forms
3.7K
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
3 ACCEPTED SOLUTIONS
Community Expert ,
Feb 14, 2024 Feb 14, 2024

If you set price to be an export value of a checkbox and then in "Amount" field go to 'Calculate' tab and select 'Value is the...' and pick your checkboxes that you wish to total, it should work on mobile devices (it works for me on Android).

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

Go to Prepare Form mode, right-click the field, select Properties and there you'll see it.

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

You'll find many tutorials, at various levels, here: https://acrobatusers.com/tutorials/

The export value of a check-box can be found under its Properties, in the Options tab:

try67_0-1708037617510.png

 

 

The calculation script goes under a text field, not a check-box:

 

try67_1-1708037652562.png

 

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

Yes, but be aware the calculations will only work if the file is opened in an application that supports PDF scripts. This excludes almost all mobile PDF viewers, and most browser plugins. Most calculations can be done using the first two options under the Calculate tab of a text field. For more complex things you'll need to write a custom script.

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

Will both Android and Apple Acrobat mobile readers support scripts? Can multiple selections be totaled, i.e., checkbox for ticket "a", checkbox for ticket "b", checkbox for ticket "c" added and placed in "Amount" text field? Would that be a custom script? Thanks

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

If you set price to be an export value of a checkbox and then in "Amount" field go to 'Calculate' tab and select 'Value is the...' and pick your checkboxes that you wish to total, it should work on mobile devices (it works for me on Android).

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

Is there a tutorial somewhere on how to do this? I'm not seeing a "Calculate" tab anywhere.

Thanks

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

Go to Prepare Form mode, right-click the field, select Properties and there you'll see 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
Engaged ,
Feb 15, 2024 Feb 15, 2024

I am not seeing where to put export value of the check box and when I control-click the check box, there is no calculate tab. Is there a tutorial on how to do this?

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

You'll find many tutorials, at various levels, here: https://acrobatusers.com/tutorials/

The export value of a check-box can be found under its Properties, in the Options tab:

try67_0-1708037617510.png

 

 

The calculation script goes under a text field, not a check-box:

 

try67_1-1708037652562.png

 

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
New Here ,
Jun 08, 2025 Jun 08, 2025

Hello Nesa -

Need help with calculations in a Forms Time sheet. I believe I have  followed what I found in this Community but still not able to calc Total Hours in the attached form.  Please can you help. Many thanks

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 ,
Jun 08, 2025 Jun 08, 2025

There are errors in your code. Check the JS Console (Ctrl+J) for details.

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
New Here ,
Jun 09, 2025 Jun 09, 2025

I"m sorry - you have to help me threre.  Can you clarify JS Control and details? Thx.

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
New Here ,
Jun 09, 2025 Jun 09, 2025

I did as directed and there was nothing there. Thx.

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
New Here ,
Jun 10, 2025 Jun 10, 2025

Hello folks, really need some help with this.  Can someone lend me a hand.  I'm try to clac total hours and was told the Script is incorrect.  However, after reviewing Ctrl J I still cannot locate the error.  See my docs above. Thanks.

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 ,
Jun 10, 2025 Jun 10, 2025

Why are you using a loop from 1 to 14 in the Calculation of TotalHour if your field names have no numbers in them at all?

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
New Here ,
Jun 10, 2025 Jun 10, 2025

My intent is to get the first row correct.  Once I have that I will copy and paste the correct Script to the remaining rows.. Thx.

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 ,
Jun 10, 2025 Jun 10, 2025

Well, if there's an error the script exits without completing, so you have to fix it first in order to test your code.

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
New Here ,
Jun 12, 2025 Jun 12, 2025

Hi, can you please help me with a Script that will calulates total hours for just one row.  I will be most appreciative.

thank you.

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 ,
Jun 12, 2025 Jun 12, 2025

Here you go...

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
New Here ,
Jun 12, 2025 Jun 12, 2025

Thank you very much for this.

I intend to copy this for each addtional row changing to StartTime, BrearkStart2 etc.

May I ask how you entered specificially entered time as --  08:30, or 01:00, 5:00 etc.

Many thanks.

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 ,
Jun 12, 2025 Jun 12, 2025
LATEST

I don't follow what you mean... I just inputted the time into 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