How to create a conditional survey

Follow

The idea

The user of the app is redirected to a page, based on the answers of a survey.

Let's build it

What we need:

  • Computations in the d!NK PowerPoint Plugin. So go install it if you haven't already.
  • Basic survey knowledge

You can download the Powerpoint file here.

Step 1: Create your survey.

Start by building your survey. In our example we will use a basic survey with 3 questions and 3 possible answers per question. If you don't know how to build a survey than start by reading this article.

When your survey is created it could look like this (basic version):

 Step 2: Define your logic / add your javascript code.

In our example we have different outcomes. But we will talk about 3 of them:

  1. Answers = A - B - C Target slide = 2
  2. Answers = A - A - A Target slide = 3
  3. Answers = B - B - B Target slide = 4

So basically: if the users answer A for the 3 questions he / she will be redirected to the 3th slide. if the user answers B for he 3 questions he / she will be redirected to the 4th slide. and so on.

Step 3: Implement your code with computations.

This is the code used for our 1ste example:

if(data[Qa] == "a" && data[Qb] == "b" && data[Qc] == "c")

{ gotoPage("#S2");}

Click the d!NK tab in PowerPoint and press the computations icon. In the first tab add your code.

Step 4: understanding the code.

Let's dig in the code to help you understand how to apply this in your example:

if(data[Qa] == "a"

If you've selected answer "a" for your survey question label called Qa

&& data[Qb] == "b"

And you've selected answer "b" for your survey question label called Qb

&& data[Qc] == "c"){

And you've selected answer "c" for your survey question label called Qc

gotoPage("#S2"); }

Than go to page / slide number 2*

To find out what the survey question label and answer is for your example:

select your survey > dink tab > edit element

 * the slide number in PowerPoint doe not always match with the slides in the d!NK admin. You can contact support if you've any problems regarding this.

 

Enjoyed reading the tutorial?

You may contact us for new cases or project issues at support@dink.eu

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk