Disable message prompt with Table of Contents feature | XM Community
Skip to main content

Disable message prompt with Table of Contents feature

  • October 26, 2022
  • 6 replies
  • 148 views

Forum|alt.badge.img+2

How can I disable this message prompting on my screen.
image.png

6 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+44
  • 1549 replies
  • October 26, 2022

robi_kalinisan
It can be disabled via JS but I would not recommend it as if a person is stuck just because they haven't submitted on or the other sections. He will never know and willl leave the survey causing loss in response rate and bad feedback and much more.


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • October 26, 2022

Hi there, if you want to try the option of disabling the message prompt or changing the text that gets displayed, I explored this a bit in this thread.


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • April 25, 2023

Since the thread I linked to is unavailable right now, below is the solution it contained.

So while I am not sure how to 'prevent' the error message from displaying, I do have code to hide the page effects + dialog and click the "Go Back" button of the dialog. To give it a try, add the below CSS to the Style section of the survey's Look & Feel:

.JFEScope body.Inactive:before, .JFEScope body.OverlayTransitioning:before {
display: none !important;
}

.JFEScope .PageErrorDialog {
visibility: hidden !important;
}

Then, add the below to the survey's Header:

<script>
jQuery("#PreviousButton").click(function() { 
setTimeout(function() {
jQuery("#Page > div > div.PageErrorDialog.TOC > div.ErrorButtons > button:nth-child(1)").click();  
}, 5);  
})
</script>

Also, if you wanted to change the message that displays on this dialog, the below can be added to the survey's Header instead:

<script>
jQuery("#PreviousButton").click(function() { 
setTimeout(function() {
jQuery("#ErrorMessage > span").html("message");  
}, 5);  
})
</script>

 


Forum|alt.badge.img+2
  • Level 1 ●
  • 9 replies
  • March 27, 2024

HI @Tom_1842 -

I know it’s been a  bit since this was posted, but I was able to use it to disable the prompt - thank you! However, I am now sometimes encountering the issue that when a user clicks the back button, there is an endless spinning wheel - and it never goes back to the former page. Any idea how to trouble shoot this? Many thanks in advance!


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • March 27, 2024

@DKICM hmm my hunch is that the piece of code that clicks the "Go Back" button of the hidden dialog might need more than 5ms after the PreviousButton click to work consistently. Try updating like the below:

<script>
jQuery("#PreviousButton").click(function() { 
setTimeout(function() {
jQuery("#Page > div > div.PageErrorDialog.TOC > div.ErrorButtons > button:nth-child(1)").click();  
}, 500);  
})
</script>

 


Forum|alt.badge.img+2
  • Level 1 ●
  • 9 replies
  • March 28, 2024

@Tom_1842 That seemed to work - thank you so much!


Leave a Reply