Change location of messages | XM Community
Skip to main content

Hi everyone,
Is there a way to change the location of messages? I present a series of questions one by one, on mobile devices only. If people make an error, a message is displayed above the question. This results in undesired changes of the layout. I expect this problem to be solved if the error message is displayed underneath the question. Is this possible? I can't find an easy fix myself, but maybe some custom code can help?
Any input would be much appreciated!
Thanks!

Hi there!
Yes, this is possible. Your best bet is to bypass the validation within the question itself, and add a placeholder question that will just display some error text on the same screen. By not adding a page break, this will just act as a way to display the message underneath the question. You can add something like this in the question text for your new placeholder question:

 

In your initial question, you'll add JavaScript to display the errorMsg object whenever that condition is true:
document.getElementById("errorMsg").innerHTML = "
ENTER ERROR TEXT HERE
";

Hopefully that helps!


Leave a Reply