help with conditional statements: if button is checked, certain text fields are required
hello, I am a little new to javascript and need to make an interactive form. thanks in advance for any guidance on this.
I have four radio buttons (C, D, E, and F) and depending which button is selected, certain text fields will be required by the user. bascially:
If C == true, then Section 2 and 3 are required fields.
If E == true, then Section 1, 3, and 4 are required fields.
If D == true, then Section 3 is the required field.
If F == true, then Section 1, 3, and 4 are required fields. //same as E
After some reading about similar-ish issues, it sounds like the confitional statements need to be in the 4 different text fields. I've tried various codes that dont work. I have started with the first text field (Section1) in the validate tab with:
var C = this.getField("Concept"); //does this.getField work with radio buttons?
var D = this.getField("Development");
var E = this.getField("Engineering");
var F = this.getField("Flight");
if(C==true){
this.getField("Section1").required = false
}
if(D==true){
this.getField("Section1").required = false
}
if(E==true){
this.getField("Section1").required = true
}
if(F==true){
this.getField("Section1").required = true
}
