Quantcast
Channel: Adobe Community: Message List - PDF Forms
Viewing all articles
Browse latest Browse all 57214

Re: Colunting Radio buttons in Forms

$
0
0

G'day Mike,

 

Try something like this in a button script:

 

     //Check to see if a min of 5 check boxes are completed on page 1

     var selectedFields = [];
     for (var i=0; i<this.numFields; i++) {
     var f= this.getField(this.getNthFieldName(i));

   

     //The page property defines the page that the fields are on
     if (f.value=="Yes" && f.type=="checkbox" && f.page == "0"){    //Change the 0 to be the page no. where the check boxes are
     selectedFields.push(f.name);}
     }

     if ( selectedFields.length >= 5 )
     app.alert("Thanks, you have completed a minimum of 5 fields");

     else
     app.alert("You must complete a minimum of 5 fields");


Viewing all articles
Browse latest Browse all 57214

Trending Articles



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