Solved

Adobe Acrobat radio button how to add counter for each checked answer

Posted on 2014-11-04
1
93 Views
Last Modified: 2015-04-17
I have put together an adobe acrobat XI pro file with 60 radio buttons.
I want to have to each button add to a counter that outputs in a text box for each answer.

The I have each set of radio buttons call Guideline with a corresponding number to the question with only 2 answers yes and no


Guideline 1 check = yes ; Counteryes =+ 1 for each yes, display in a text box named Guideline Calculation Yes
Guideline 2 check no ; Counterno =+1 for each no, display in a text box named Guideline Calculation No
0
Comment
Question by:itdeptvnam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 40428738
Create the two fields Counteryes and Counterno, and make them read-only. Now add a custom calculation script to the Counteryes field and use the following code:

var aRadioButtons = [ "Radio1", "Radio2", "Radio3", "Radio4" ];

// count the number of "Yes" and "No" selections
var numYes = 0;
var numNo = 0;

for (var i in aRadioButtons) {
    var f = this.getField(aRadioButtons[i]);
    if (f != null) {
        if (f.value == "Yes") {
            numYes++;
        }
        else if (f.value == "No") {
            numNo++;
        }
    }
}

// this is the "Counteryes" field
event.value = numYes;
this.getField("Counterno").value = numNo;

Open in new window


You of course have to modify the array with the radio button names to contain your 60 radio button groups that you are using.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Select application to open PDF in IE 3 70
Adobe Acrobat Pro top display text upside down? 5 178
Need graphics tool to create card game 2 185
TXT to PDF help needed 26 127
Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question