How Do I Disable Copying and Pasting? | XM Community
Skip to main content
Hi,



How would I disable copying and pasting on Qualtrics surveys?



I tried to put this code



<script type="text/javascript">

$(document).ready(function () {

//Disable full page

$('body').bind('cut copy paste', function (e) {

e.preventDefault();

});



//Disable part of page

$('#id').bind('cut copy paste', function (e) {

e.preventDefault();

});

});



</script>





in the after the Qualtrics.SurveyEngine.addOnload(function() part of a specific question, but when I previewed the survey copying and pasting was still possible. Also, can I implement this across the entire survey except for one question somehow?



I've seen this question posted here https://www.qualtrics.com/community/discussion/632/disabling-copying-of-the-survey-and-right-click-functions

but this is not what I'm looking for and it is not sufficient.
Can you try adding this:



`.noselect {

-webkit-touch-callout: none; /* iOS Safari */

-webkit-user-select: none; /* Safari */

-khtml-user-select: none; /* Konqueror HTML */

-moz-user-select: none; /* Firefox */

-ms-user-select: none; /* Internet Explorer/Edge */

user-select: none; /* Non-prefixed version, currently

supported by Chrome and Opera */

}



<p>

Selectable text.

</p>

<p class="noselect">

Unselectable text.

</p>`
This seems to be what I want, but where should I put this? when I tried to include this as is on javascript and on html part of a question and it didnt work. Javascript code was in orange and html in "html view" just included this as the text
> @mleipzig said:

> This seems to be what I want, but where should I put this? when I tried to include this as is on javascript and on html part of a question and it didnt work. Javascript code was in orange and html in "html view" just included this as the text



Hello @mleipzig ,



Paste the following code in the look and feel -> Advanced -> add custom css



body {

-webkit-touch-callout: none;

-webkit-user-select: none;

-khtml-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

user-select: none;

}



Thanks to bansalpeeyush29!!

Hi! I am trying to do the same (disable pasting on the text entry type of question) but I didn’t understand where the code should be inserted! I couldn’t find “advanced” in the look and feel option. And other than that, is there anything else that should be changed? If you could provide me with a step by step I’d really appreciate it, because I’m very inexperienced with Qualtrics! 

 

Thank you!


Leave a Reply