How do I enable two warnings for missed questions in a survey? | XM Community
Skip to main content

I want to warn the survey respondent twice if they don’t answer a question without forcing a response.

 

Hi @rchinjr - You can use “Request response” feature to warn respondent if they leave question unanswered but you can’t limit it to two times only. If you want something like that, you can create that setup in javascript.

 


Hi @rchinjr ,

You can follow below steps to achieve the same:
So , to achieve this you have to create a  text type question and sets it default value to 2 and make it auto advance on load:
 

Then create an embedded data count and sets it value to 0.

Now on question on which you want to achieve above validation add below JS code:
 

Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/

});

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
let nextButton = document.getElementById('NextButton');


nextButton.addEventListener("click", function()
{

let count = parseInt(Qualtrics.SurveyEngine.getEmbeddedData('count'));


count += 1;


Qualtrics.SurveyEngine.setEmbeddedData('count', count);


console.log('Count value: ' + count);



});
});

Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/

});

And below validation logic in on question you have applied JS:
 


Hope this resolves your query😊!!


Hi @rchinjr 
There is a workaround for this as well. You can create 2 warning questions (text/graphic question type) in 2 separate blocks and can add branch logics in the survey flow to program them accordingly.
Please refer below image.
 


Once the question is passed without being answered, a warning block will be displayed (text can be anything according to your requirement) and then the unanswered question will be displayed. Repeat the process again and then you can end the survey or can be moved forward to the next question according to your requirement.


There are some great answers above, but since it's only one question, I would go with something simpler. 

Ask the same question twice, let's call them A and B, both with request response. B should come right after A with a page break in between. Add display logic to B, it should only be shown if A is unanswered.

Now you've got two prompts. 


Leave a Reply