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

Trying to create tally form

Community Beginner ,
Feb 28, 2016 Feb 28, 2016

Copy link to clipboard

Copied

I'm trying to create a form to track a token economy in Acrobat Pro DC. The amounts will be in whole number increments. I thought that I'd be able to assign a values to Button form fields, have them clicked, and have the corresponding value maintain a running total in a Text field. If this is possible, my skills are insufficient. Instead, I'm using Checkbox fields, assigning values to them, and using the Value is the sum function under to calculate tab. The limitation of this method, however, is that it changes the sum as I uncheck a box. I need this to not happen and I suspect that I'll need some javascript either in the Checkbox field, the Textbox field, or both. Thanks.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

571

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Feb 28, 2016 Feb 28, 2016

So you want to increment the value of a text field each time a button is clicked? That's certainly possible.

You can use something like this script as the Mouse Up event of the button. Let's assume the name of the text field is "Counter".

var f = this.getField("Counter");

f.value = Number(f.valueAsString)+1;

Votes

Translate

Translate
Community Expert ,
Feb 28, 2016 Feb 28, 2016

Copy link to clipboard

Copied

So you want to increment the value of a text field each time a button is clicked? That's certainly possible.

You can use something like this script as the Mouse Up event of the button. Let's assume the name of the text field is "Counter".

var f = this.getField("Counter");

f.value = Number(f.valueAsString)+1;

Votes

Translate

Translate

Report

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 Beginner ,
Feb 28, 2016 Feb 28, 2016

Copy link to clipboard

Copied

You, sir, are quite correct! Your help is greatly appreciated and I would like to know what you training you would suggest for a person wishing to code with JavaScript using Acrobat. Thank you very much!

Votes

Translate

Translate

Report

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 28, 2016 Feb 28, 2016

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

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