Copy Paste Prevention - "Form" style text entry questions | XM Community
Skip to main content
I am trying to prevent people from pasting into a a from-style text entry question in a survey I am creating. I have a code that prevents Copy/Paste into a typical text box (works for "single line", "multi line", "essay text box," and "password" text entries); but, it does not work with "form" text entry boxes. Does anybody have an effective copy/paste Javascript that works with form-style questions?
This should work on any type of text inputs in a question:

```

Qualtrics.SurveyEngine.addOnload(function() {

jQuery("#"+this.questionId+" textarea,input[type=text]").on("paste", function(e) { e.preventDefault(); });

});

```
This is perfect! Thank you!

Leave a Reply