Disabling copying of the survey and right click functions? | XM Community
Skip to main content
Hello, I am looking for how to disable the copying of the survey (including right click function) and the custom coding needed to accomplish this.
There really isn't any way to stop someone from copying or doing screenshots of a survey. Therefore, disabling the contextmenu (right click) will, at most, only slow someone down a bit. You're fooling yourself if you think it will add any type of security.



However, if you want to go through the useless exercise, you can disable the contextmenu by adding the following to an Qualtrics.SurveyEngine.addOnload function in the header of your survey:

```

jQuery(document).on("contextmenu", function(e){

e.preventDefault();

}, false);

```
Thank you, TomG. This has been helpful. I recognize this adds essentially no protection, but for whatever reason it is required by the original owner of a measure that I am licensed to use. I appreciate your time.
Sorry, I am trying to do this but not really getting there.

Is this the path?

_Look & Feel > Advanced > Header _> what then??

Sorry, I am a beginner with Qualtrics.

Thank you very much.
Click on the question’s cog and Add JavaScript, then add to addOnload function.
Many thanks! It worked perfectly!
> @TomG said:

> There really isn't any way to stop someone from copying or doing screenshots of a survey. Therefore, disabling the contextmenu (right click) will, at most, only slow someone down a bit. You're fooling yourself if you think it will add any type of security.

>

> However, if you want to go through the useless exercise, you can disable the contextmenu by adding the following to an Qualtrics.SurveyEngine.addOnload function in the header of your survey:

> ```

> jQuery(document).on("contextmenu", function(e){

> e.preventDefault();

> }, false);

> ```



Hi Tom,

Just checking is there a way we can disable print screen in case we have images in survey.
> @bansalpeeyush29 said:

> Hi Tom,

> Just checking is there a way we can disable print screen in case we have images in survey.

I don't think there are any solutions that a determined respondent can't get around rather easily. See this post for a solution that may deter casual (i.e., not very determined) respondents:

https://stackoverflow.com/a/37604125/4434072
Thanks Tom.
I can't tell you how many times I have been asked to do this over the course of my working life and I am in full agreement with Tom. This is a futile exercise. You can always get around such 'protections' with minimal effort. They simply give an illusion of security. Doesn't stop people asking, doesn't stop me shaking my head and saying "but...", ultimately doesn't stop me pointlessly applying this anyway. Certainly not a dig at the OP - just recognition that basic technical literacy in this regard is lacking.

Leave a Reply