Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

How to get the name of a subform in a script?

$
0
0

I have a script that I'd like to use to count how many checkboxes are checked in a particular subform.  Problem is that I have several subforms with checkboxes, and I only want to evaluate checkboxes in a certain subform.  The following script works, but again, looks at all checkboxes on the entire form.

 

What if statement would I need if I wanted to limit the function to only work on the subform named Employee_Info?  I just can't figure out how to specify a subform name and compare it to the subform name of each checkbox.  I hope that makes sense.

 

function countChk(vNode) {

          if (vNode.className === "field") {

                    if (vNode.ui.oneOfChild.className === "checkButton") {

                              if (vNode.items.nodes.length > 1) {

                                        if (vNode.value.oneOfChild.value == 1) {

                                                  nChk++ ;

                                        }

                                }

                            }

                        }

          for (var i = 0; i < vNode.nodes.length; i++) {

        countChk(vNode.nodes.item(i));

          }

}


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>