- Ce sujet est vide.
-
Sujet
-
Bonjour,
Voilà mon problème : j’ai un formulaire PDF avec 30 checkboxes et il me faudrait avoir le total de celles qui sont cochées.
J’utilise ce script java qui me renvoie un texte mais je n’arrive pas à trouver pour le résultat.Merci de votre aide par avance.
Voici mon code :
Code:var val4 = 0;
var val3 = 0;
var val2 = 0;
var val1 = 0;
var valNA = 0;var cValue1 = this.getField(« Choix1 »).value;
var cValue1 = this.getField(« Choix2 »).value;
var cValue1 = this.getField(« Choix3 »).value;
var cValue1 = this.getField(« Choix4 »).value;
var cValue1 = this.getField(« Choix5 »).value;
var cValue1 = this.getField(« Choix6 »).value;
var cValue1 = this.getField(« Choix7 »).value;
var cValue1 = this.getField(« Choix8 »).value;
var cValue1 = this.getField(« Choix9 »).value;
var cValue1 = this.getField(« Choix10 »).value;
var cValue1 = this.getField(« Choix11 »).value;
var cValue1 = this.getField(« Choix12 »).value;
var cValue1 = this.getField(« Choix13 »).value;
var cValue1 = this.getField(« Choix14 »).value;
var cValue1 = this.getField(« Choix15 »).value;
var cValue1 = this.getField(« Choix16 »).value;
var cValue1 = this.getField(« Choix17 »).value;
var cValue1 = this.getField(« Choix18 »).value;
var cValue1 = this.getField(« Choix19 »).value;
var cValue1 = this.getField(« Choix20 »).value;
var cValue1 = this.getField(« Choix21 »).value;
var cValue1 = this.getField(« Choix22 »).value;
var cValue1 = this.getField(« Choix23 »).value;
var cValue1 = this.getField(« Choix24 »).value;
var cValue1 = this.getField(« Choix25 »).value;
var cValue1 = this.getField(« Choix26 »).value;
var cValue1 = this.getField(« Choix27 »).value;
var cValue1 = this.getField(« Choix28 »).value;
var cValue1 = this.getField(« Choix29 »).value;
var cValue1 = this.getField(« Choix30 »).value;if(cValue == « Choix4 ») val4++;
if(cValue == « Choix3 ») val3++;
if(cValue == « Choix2 ») val2++;
if(cValue == « Choix1 ») val1++;
if(cValue == « ChoixN/A ») valNA++;var cMsg = « Yes answers: » + val4 + « n »;
this.getField(« Sum4 »).value = « total »;
- Vous devez être connecté pour répondre à ce sujet.