For most part this script works fine, it checks if Check Box4 is checked and if it is, it results in a calculation of Level + Check Box4 thru 7. The problem occurs that if any of Check Box5, 6 or 7 check boxes are in an off state, the calculatiuon returns the word "OFF" into the field as their output. The calculation still works but visibly this is bad.
Advice on how to retreive the on value but ignore the off value of a check box would be appreciated.
<code>
var v1 = this.getField("Check Box4").value;
if (v1 /= "") {
event.value = this.getField("Level").value
+ this.getField("Check Box4").value
+ this.getField("Check Box5").value
+ this.getField("Check Box6").value
+ this.getField("Check Box7").value; }
if (isNaN(v1) || v1 === "") {event.value = "0";}
</code>
I wish we could set both on (2) and an off (0) value to a check box... :(
Aucun commentaire:
Enregistrer un commentaire