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

I created a pdf form and am using radio buttons. I am using adobe Acrobat pro XI.

New Here ,
Feb 08, 2019 Feb 08, 2019

Copy link to clipboard

Copied

I created a PDF form and am using radio buttons. I am using Adobe Acrobat Pro XI. I have been creating fillable forms for about a year now but want to take the extra step. I have 15 different group of radio buttons named "Observation Group 1 to  Observation Group 15" and in each group i have 3 choices " compliant, non-compliant and not applicable". i would like to be able to total each of the 3 choices ( how many compliant, how many Non-compliant etc) in another box. I think I would need a script file for this. I think it goes in the "Calculate" or in the "action" properties but really have no clue how to do it.  I have read a lot of this forum and would love any help you could bring. In my head it doesn't seem very hard when I explain what I want but I might be wrong.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

528

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 08, 2019 Feb 08, 2019

No, it's not too difficult. You can use this code as the custom calculation script of the first total field:

var total = 0;

for (var i=1; i<=15; i++) {

    if (this.getField("Observation Group "+i).valueAsString=="compliant") total++;

}

event.value = total;

Adjust the value in line #3 to use it for the other total fields.

Votes

Translate

Translate
Community Expert ,
Feb 08, 2019 Feb 08, 2019

Copy link to clipboard

Copied

No, it's not too difficult. You can use this code as the custom calculation script of the first total field:

var total = 0;

for (var i=1; i<=15; i++) {

    if (this.getField("Observation Group "+i).valueAsString=="compliant") total++;

}

event.value = total;

Adjust the value in line #3 to use it for the other total fields.

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
New Here ,
Feb 08, 2019 Feb 08, 2019

Copy link to clipboard

Copied

That was exactly what I was looking for. While reading through this forum I had noticed that "try67" is super helpful and was very happy to see that you had responded to my problem. Thank you very much for the help. I looked through the script and pretty much understood what you had done. Hope to be able to this on my own soon....

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 08, 2019 Feb 08, 2019

Copy link to clipboard

Copied

LATEST

🙂 You're welcome!

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