Relocate In validation error message from top to bottom of page | XM Community
Skip to main content
Solved

Relocate In validation error message from top to bottom of page

  • September 28, 2023
  • 2 replies
  • 163 views

Forum|alt.badge.img+1

Hi All,

I would like to relocate the validation error message from its default position at top of page to bottom (desired position shown in image below).

 

When using the following JS it is not running.  However, this code is running when applied to the live console - hence able to produce the screenshot above.

	const skinDiv = document.getElementById('SkinContent'); 
	const errorDiv = document.querySelectorAll('.ValidationError')
	if (errorDiv !== null) {
  		skinDiv.insertBefore(errorDiv, skinDiv.children[1])
	}

Hoping to get any tips on how to adjust the code.  Note that I have reached out to Qualtrics directly on this, who referred me to this page.  Unfortunately, I am not the author of the JS code and struggle to resolve it.  I am working with a front-end dev who has limited experience on Qualtrics as well as access.

 

Appreciate support in advance :)

 

Best answer by TomG

@TimQantas

This should do it:

Qualtrics.SurveyEngine.addOnload(function() {
	var q = jQuery(this.questionContainer);
	q.children(".ValidationError").each(function() { q.append(jQuery(this)); });
});

 

View original

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5938 replies
  • Answer
  • September 28, 2023

@TimQantas

This should do it:

Qualtrics.SurveyEngine.addOnload(function() {
	var q = jQuery(this.questionContainer);
	q.children(".ValidationError").each(function() { q.append(jQuery(this)); });
});

 


Forum|alt.badge.img+1
  • Author
  • 1 reply
  • September 29, 2023

@TomG thank you very much!  I have applied the change and it is working !

 

Appreciate your quick support!