Solved
Modal window with reference to previous answers
Hi everybody :) , I'm trying to create a modal window alerting people to control their answers, before going on.
To be precise, my survey questions are (more or less) like these:
1. How many apples did you buy yesterday? (this is a text entry type of question - single line - with options: force responce and custom validation (value greater or equal than 0))
2. (this question is displayed only if the answer to the previous question is greater than 0) About those apples, did/will you:
- make a cake (number of apples)
- store them (number of apples)
(This is a side by side question type - with options (custom validation - all entries are Not empty and column options: numerical value)
I would like that when a person answers to question 2 and pushes on "next botton", a modal window opens saying something like:
"Please, before passing to next question, verify that the sum of apples is equal to ANSWER TO question 1."
So the message will be customized for every respondent.
My problem is, how can I write ANSWER TO question 1 in javascript? I am able to create a modal window with a customized text (using the function window.alert), but not to refer to QUESTION 1 ANSWER. Please, can you help me?
Best answer by univa2018
@Akdashboard @TomG
I solved my issue, the problem was just to identify the way qualtrics rename my question 1. I got it exporting the CSV of data (4° row of the excel file).
Just to let you know, this is the code that works:
Qualtrics.SurveyEngine.addOnUnload(function()
{
var numberofcontracts = "${q://QID25/ChoiceTextEntryValue}"
window.alert("verify "+numberofcontracts)
});
p.s. I'm, a "newcomer", so I apologize if I bothered you with these "little things"... :)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
