Hello all
I am creating a survey consists of 10 questions, and I would like to add a questions right at the end with Auto-check boxes of Yes/No when a certain conditions are met.
If the user answered all questions, the Yes box is autochecked, and if user missed any question, then the NO box is autochecked.
Is this possible?
Thanks
Shuang.
Auto-checked Yes/No with condition.
Best answer by ElieD
Hi Shuang,
Here is a working code :
First, add an embedded with your conditions to verify survey completion :
The value of the embedded data have to correspond with your yes/no question options
In my example, the validation question choices are 1 for "Yes" and 2 for "No"
So my embedded data will be set like that
Once you have your embedded data set, you can add this javascript code to your question
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
var complete = "${e://Field/complete}";
this.setChoiceValue(complete, true)
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Et voilà !
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
