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
Solved! Go to Solution.
Views
Replies
Total Likes
try this:
if (RadioQ2.rawValue=="2"){
Q2.validate.nullTest = "error";
}
else {Q2.validate.nullTest = "disabled";
}
Views
Replies
Total Likes
try this:
if (RadioQ2.rawValue=="2"){
Q2.validate.nullTest = "error";
}
else {Q2.validate.nullTest = "disabled";
}
Views
Replies
Total Likes
Thank you very much for your help!
Sorry it took me a few days to respnd, I've been out with bronchitis.
Views
Replies
Total Likes
Views
Likes
Replies