Expand my Community achievements bar.

How to check to see if any Checkboxes within a subform are checked

Avatar

Level 1

Hi everyone, I'm sure there is a way (possibly through JavaScript) to figure out if any checkboxes in a subform are checked but I can't seem to figure it out.  I'll work on uploading my form so that it will be easier to see what I'm talking about but in the mean time here is a brief explanation of how the form is setup:

my form's hierarchy is as follows:

Form1

     -(Master Pages)

     -TaxRegBusInfo

          -SubForm2

               -Checkbox1 (it will show/hide the following subform based on if it's checked or not)

                    -Q2SubForm1

                         -CheckboxA

                         -CheckboxB

                         -CheckboxC

                         etc (totaling out to about 50 checkboxes)

LiveCycle Problem.PNG

Basically what I'm trying to figure out is how to write some code (I'm guessing a function?) that I can use so that when someone goes through the form and selects any of the checkboxes (A,B,C, etc.) in any order or combination, a text box say something like "items checked."

I've looked into the "resolveNodes" and "instanceManager" functions as well as the Adobe LiveCycle help but I've only just started to dabble in JavaScript so I can't quite seem to figure out how to use them properly.  Any help or links to beginner friendly documentation would be much appreciated!

2 Replies

Avatar

Level 2

Can you post the form or send it to me?

To be clear, you want it so that when any item is clicked, it will show which item is click in another location on the form?

Avatar

Level 1

It doesn't necessarily have to show which items are checked but it would be helpful.

last night I started with this and it seems to work but I'm sure there is a better/more efficient way of doing it

var BoxCount = TaxRegQ1.chkAL.rawValue + TaxRegQ1.chkAR.rawValue + TaxRegQ1.chkAZ.rawValue

if (BoxCount>0){

Checked.rawValue = "Yes";

}

else

{

Checked.rawValue = "No";

}

How do you upload to this forum?  Sorry i'm new to posting to the Adobe forum and can't seem to find the option.