1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| // Specify a list of required field names:
var requiredField = ["oblig.nom", "oblig.prenom", "oblig.ddn"];
// Loop through the array of field names:
for (var i=0; i<requiredField.length; i++){
var f = this.getField(requiredField[i]);
if (f.value == ""){
app.alert("The " + requiredField[i] + " field is required; please click OK on this message; enter data; and then click this button again until there are no error messages")
break;
}
else if(i == requiredField.length - 1) {
app.alert({
cMsg: "Attention ! Une fois verrouillés, ces champs ne seront plus modifiables", nIcon: 1, nType: 1
});
if ( nButton == 1 ) this.getField("oblig").readonly = true;
}
} |