Is there a way to change the Request Response Message? | XM Community
Skip to main content

I am currently working on a matrix style questionnaire. I currently have Request Response set up so that if a participant misses an item or multiple items in the question the following message pops up: There are x unanswered questions on this page. Would you like to continue?

I would like to change the content of this pop-up message. Does anyone know of a way to do that?

You can do it via custom messages. Select custom validation and it will show you an option to select a custom message.


Custom validation has no impact on Request Response. Request response happens before custom validation. With custom validation it either meets the condition or not, so the functionality is different than request response where the respondent can choose to continue without answering.
As to the original question. It is possible to change the message, but quite complicated. It could be done the same way as this: https://www.qualtrics.com/community/discussion/comment/32225#Comment_32225


TomG Thank you for pointing that out. I had assumed that both functionalities would be using a similar execution pattern, as they are grouped together in the options.
As for hwhite's original question. While TomG's function has more much functionality. This is a short script that can get the job done. If all questions have not been answered, it basically shows a pop-up, asking people whether they want to continue without answering the questions.
Qualtrics.SurveyEngine.addOnReady(function(){
    const qid = this.questionId;
    tot_choices = Qualtrics.SurveyEngine.registrygqid].getChoices().length;
    var sel_choices = 0;
    
    that = this;
    this.questionclick = function(){
        sel_choices = that.getSelectedChoices().length;
    }
    
    document.querySelector("#NextButton").onmousedown = function() {check_answers();};


    function check_answers(){
        if (sel_choices == tot_choices){that.clickNextButton();}
        else{
            //Selecting Okay will result in continuing
            if (confirm("Custom message here") == true) {
                that.clickNextButton();
            } 
        }
}
});


This is another simpler implementation of the same. This one just changes the text of the Request Response. I've only tested it with one question on the page:

let my_interval;
Qualtrics.SurveyEngine.addOnReady(function(){


    document.querySelector("#NextButton").onclick = function() {
        my_interval = setInterval(() => {
            err_msg = document.querySelector("#ErrorMessage");
            if (err_msg != null) {
                err_msg.innerText = "Custom Message";
                clearInterval(my_interval);
            }
        }, 10);
        
    };
});


Qualtrics.SurveyEngine.addOnUnload(function() {
    clearInterval(my_interval);
});


This is great! I'm not familiar with working with custom code on Qualtrics. Where in the survey would we put this code?


This is another simpler implementation of the same. This one just changes the text of the Request Response. I've only tested it with one question on the page:

let my_interval;
Qualtrics.SurveyEngine.addOnReady(function(){


    document.querySelector("#NextButton").onclick = function() {
        my_interval = setInterval(() => {
            err_msg = document.querySelector("#ErrorMessage");
            if (err_msg != null) {
                err_msg.innerText = "Custom Message";
                clearInterval(my_interval);
            }
        }, 10);
        
    };
});


Qualtrics.SurveyEngine.addOnUnload(function() {
    clearInterval(my_interval);
});

 

Hi Ahmed,

I've successfully implemented the code, and it's working perfectly!

My survey includes both Hebrew and Arabic languages. I'm curious about how I can modify the custom message to appear in Arabic when respondents choose the Arabic version of the survey.

Thank you!

 


Leave a Reply