Avatar

Level 3

I have a form that has several radio buttons and corresponding Comment boxes.

When the user chooses the No radio button, I want the comments section to become mandatory.

So I wrote

 

if (RadioQ2.rawValue=="2"){

       

Q2.mandatory

 

}

In the binding tab, the No item has a value of 2.

RadioQ2 is the radio buttons and Q2 is the comments for question 2.

This works for No, but also gives the same message for Yes (which = 1).

I am certainly not a programmer by any means, so what I have is probably not correct, but I hope I'm sort of close!

Thanks for your help, Gretchen