I have "Autoadvance on Questions" and "Autoadvance on pages" enabled on my survey. For one of the questions (dropdown list), I'd like to show default text "select one". When i use the code below, the autoadvance gets in the way and submits the survey before user has a chance to actually select an answer. What code should I use?
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery("#"+this.questionId+" select").find("option:eq(0)").text("Select one").attr("selected","disabled",true);
});
Thanks.
Solved
Default text for dropdown list
Best answer by TomG
Try this:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" select").find("option:eq(0)")
.text("Select one").prop({"disabled":true,"selected":true});
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.