Hi everyone,
I'm setting up a survey with a couple of matrix table questions, each one contains some statements which I would like people to rate by Likert scales.
Because of the statement lists are a bit long (some contains more than 10 statements), I do not want to force the respondents to rate each single statement, but rather, for each matrix table question, force them to rate at least 3 out of the given statements.
How do I set the custom validation to achieve this?
Here's a snapshot if it helps to make sense, as you can see there are seven statements, and I would like people to rate at least 3 of them.
!
Thank you!
Page 1 / 1
I don't believe this can be done in validation alone. You would need to either create some branch logic after the question in the survey flow and then repeat it OR you could use some custom code. This question might be better answered if posted in the Custom Code category.
Right, this is not feasible by validation code only. You can use below code that would disable the next button until 3 rows are answered so respondent can move next only after answering at-least three statements. You can update this code to show error message as well if respondent try to click next button instead of disabling it.
Qualtrics.SurveyEngine.addOnload(function()
{
this.disableNextButton();
this.questionclick = function(event,element)
{
if (element.type == 'radio')
{
var numAnswered= this.getSelectedChoices()
if (numAnswered.length >= 3)
{
this.enableNextButton();
}
else
{
this.disableNextButton();
}
}
}
});
Qualtrics.SurveyEngine.addOnload(function()
{
this.disableNextButton();
this.questionclick = function(event,element)
{
if (element.type == 'radio')
{
var numAnswered= this.getSelectedChoices()
if (numAnswered.length >= 3)
{
this.enableNextButton();
}
else
{
this.disableNextButton();
}
}
}
});
Thank you @KimothiSaurabh and @Libertywick for your answers. The disable "next" button suggestion sounds like a good work-around. I'll give it a try.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.