How to add javascript | XM Community
Skip to main content

Hello:
I'm new to qualtrics and I'm trying to figure out how to change the error message "Please answer this question" for those who don't answer a question. I know this has been discussed before, and I did see some java code for doing this - see below. But I'm not sure where to put the code. I went to general then to header, but I as under the impression that there's supposed to be a button that looks like this <> that one uses to add the script. But I don't see it.
Any guidance would be greatly appreciated!

Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery (".ValidationError").html('');
jQuery (".ValidationError").append("Your custom error message");
});

geno
You can do two things here

  1. You can include JS in header source by clicking on source as you see in image below

image.png2 You can create a custom message by going within Survey Options>> Responses>> Custom Error message to change it once and for all.
image.pngHope it helps!


Thank you so much, Deepak!


Thank you so much Deepak for being thoughtful and sharing multiple solutions! 👏


Leave a Reply