Set textbox value based on multiple other form fields
I am working on a form that has a required question with multiple choices. If any one of the choices is completed, the question is considered answered. I am attempting to create a hidden field that would work as the check to validate that the question was answered. I would also like if one of the multi-choice fields is cleared out that the hidden test field also clears out. The multiple choices consist of one checkbox and three text fields.
Could someone please assist in correcting ?
var a = this.getField("Checkbox1");
var b = this.getField("TextField1");
var c = this.getField("TextField2");
var d = this.getField("TextField3");
if (a.value=="On"){
event.value = "On";
}
else if (a.value==""){
event.value = "";
}
else if (b.value){
(event.value = b.value);
}
else if (c.value){
event.value = c.value;
}
else if (d.value){
event.value = d.value;
}
else{
event.value = "";
}
