========== BEGIN OF QUESTION
Question: Do you agree with blah blah blah ? If disagree, you must explain your answer on "Comments" field.
Choices (only one choice):
1. Agree
2. Disagree
3. Partially disagree
Comments: ____________________________
========== END OF QUESTION
The "Comments" field is optional by default, but if choice 2 (Disagree) is selected, the "Comments" fields should be required.
How do I do that?
Thanks in advance!
Last edit: 9 years 10 months ago by dmitsuo. Reason: typo
You can make use of the validation equation.
Something like this should work:
self.NAOK != 2 || (self.NAOK == 2 && strlen(self.comments) > 0 )
Explanation: Either answer is different from 2 or answer is 2 and a comment was entered.
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.