Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Copy Paste Prevention - "Form" style text entry questions

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?


Best Answer

  • TomG
    TomG Raleigh, NC Wizard ✭✭✭✭✭
    Accepted Answer

    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(); });