Skip to main content

I am trying to disable the right click for users. Does anyone know the correct HTML code? I have tried using <body oncontextmenu="return false;"> to no avail. I want the end user to be unable to right click and see the form url as I have embedded the form within another website using an Iframe.

Hi,


 


Perhaps this might help.


https://vijaydk2guy.wordpress.com/2017/05/31/how-to-restrict-right-click-on-an-image-control-in-k2-smart-form/


 


 


Thank you for the suggestion. Unfortunately, it did not work. I am also trying to block the right click for the entire form and not just the image. Really cool idea though!

 


Hi

Add the following  code under your html and test it by  right clicking on your page.

<script language="JavaScript"> document.addEventListener("contextmenu", function(e){ e.preventDefault(); }, false); </script>

if this page is helpful  dont forget to mark it as both KUDOS and solution or KUDOS only.

Regards

Elvis


Reply