If then statement with checkboxes
I am playing around with an inspection form and am trying to decide if radio buttons or check boxes are the better option. I am trying to program if then statements for checkboxes so that when a checkbox is selected, a point value is displayed in a specific text box. I learned how to accomplish this with radio buttons so I am hoping the philosophy is similar for checkboxes. Below is what I am trying to do. The code is accepted in the PDF form but nothing is being populated. Any help is much appreciated.
event.value = "";
if (N/ACheckBox.isSelected()){
event.value = 1;
} if (GreenCheckBox.isSelected()){
event.value = 1;
} if (AmberCheckBox.isSelected()){
event.value = .5;
} if (RedCheckBox.isSelected()){
event.value = 0;
}
I am hoping that the point value will disappear if the statements are false too.
