Branching using Custom JavaScript validation - How to?

There are multiple scenarios where Branching using JavaScript validation could be extremely handy and useful to solve your problems. For instance :

  • Where you want to branch the question based on response to prior questions in the survey.
  • If you don't want to give response to some questions in the survey.

How do I set up the Branching using custom JS validation? Any Example I can see?

Here is a use case that explains how to set up a simple Branching using JS validation script on the question.

Lets assume that in the below mentioned survey we don't want answer for question Q3 of the survey if I select Visa card option and directly proceed to question Q4.

  • Step 1 :We will need to set the JS validation script on question Q2 to solve this problem.

  • Go to: Login » Surveys » Workspace » Logic » JavaScript Logic
  • Enable the option for Pre JavaScript Validation to write the JS code.
  • Survey Software Help Image
  • This is what the respondent will see if he selects Visa Card for Q2
  • Survey Software Help Image

  • This is what the respondent will see if he selects Visa Card option for Q2

  • Survey Software Help Image

  • This is what the respondent will see if he selects any other option from Credit Cards for Q2

  • Survey Software Help Image

License & Access Options

This feature/tools described here are available with the following license(s) :

Team Edition

Unlimited Surveys, Questions

Advanced Toolset and Features

No Long Term Commitment

Was this article helpful?
Sorry about that
How can we improve it?
Submit