How to disable/stop a particular word or phrase from being entered into the Text Entry box | XM Community
Skip to main content
Solved

How to disable/stop a particular word or phrase from being entered into the Text Entry box


Forum|alt.badge.img+2

Hi All,
Due to the sensitivity of my study, I would like to know how I can stop respondents from inputting certain phrases or words into the Text Entry box.
For example, how do I stop respondents from entering words such as "vulgar" into the Text Entry box.
Is there a functionality or Javascript in Qualtrics that can do that?
Kind regarads,
Peatuhacs

Best answer by TomG

Yes, you can use JavaScript to censor specific words. You can use .replace() to search for and replace matching words in the addOnPageSubmit() function.

View original

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5923 replies
  • Answer
  • June 15, 2022

Yes, you can use JavaScript to censor specific words. You can use .replace() to search for and replace matching words in the addOnPageSubmit() function.


Forum|alt.badge.img+2
  • Author
  • 2 replies
  • June 15, 2022

Hi TomG
Thank you so much for this.
I not familiar with writing JavaScript so I don't know what it looks like when written in full in the PageSubmit() function.
Kind regards,
Peatuhacs


Leave a Reply