There are multiple scenarios where JavaScript validation could be extremely handy and useful to solve your complex validation problems. For instance :
If you are a average to good JavaScript programmer you can solve any validation problem with this feature. A novice to JS could learn the basics and should be able to use the feature to solve straight forward validation problems in the survey.
Here is a use case that explains how to set up a simple JS validation script on the question. Lets assume that in the below mentioned survey we dont want people who have selected Monthly for Q1 which is on Page 1 of the survey and Visa for Q2 which on Page 2 to proceed.
Step 1 :We will need to set the JS validation script on question Q2 (Credit Cards) to solve this problem.
Go to: Login » Surveys » Workspace » Logic » JavaScript Logic
Enable the option for Pre JavaScript Validation to write the JS code.
This is what the respondent will see if he selects Monthly for Q1 and Visa for Q2
Yes. You can refer to all the questions that are loaded prior to the question that you are setting the validation on. The values are carried through to the finish page of the survey.
Yes. You can refer to prior responses in the survey. All the responses are stored in JavaScript Variables and restored all the way through the survey.
You can refer the responses to following question types. Where number in the top right corner would be the question code for that question
Multiple Choice Many Select
Drop Down Menu
Comment / Suggestion Box
Single Row Text
Numeric (freeform) Input
Email Address
Multi-Point Scales
Checkbox / MultiSelect
SpreadSheet
Scale (Graphical)
Rank Order
Side-By-Side Matrix
Dynamic Lookup Table
Net Promoter Score