Changing Field to Required After Pressing Submit
I have the following code on my Submit button set for Mouse Down.
Not sure where this code is messing up. I am trying to have the submit button check that all required fields are filled out and if they are to make 2 specific fields required.
for (var i=0; i<this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f.type != "button" && f.required === true){
if((f.type == "text" && f.value == "") || (f.type == "checkbox" && f.value == "Off")){
emptyFields++
}
}
} if (emptyFields = 0){
this.getField("Executive or Director Signature").required = true;
this.getField("Executive or Director Name").required = true;
}
