Branching using Custom JavaScript validation - How to?

When should I consider Branching using JavaScript validation on the question?

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 » Question's Edit icon » Settings » Validation and Settings

  • Survey Software Help Image
  • 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

War dieser Artikel hilfreich?
Das tut uns leid
Wie können wir es verbessern?
einreichen