Im using Gravity forms on Wordpress. We have a text area that we have disabled cut, copy, paste and drop using Javascript.
We are using the following:
<script type="text/javascript">
$(function () {
var controls = $(".disable");
controls.bind("paste", function () {
return false;
});
controls.bind("drop", function () {
return false;
});
controls.bind("cut", function () {
return false;
});
controls.bind("copy", function () {
return false;
});
});
$('textarea').on('paste', function () {
var element = this;
setTimeout(function () {
$(".paste-alert").append("<b>Copy and paste detected:</b> Please take time to write a unique description for your listing. This will ensure your advert will get found in the search engines and help keep Local Business a high authority, free directory. ");
}, 100);
});
</script>
and adding a "disable" class to the textarea.
We also have a separate element:
<p class="paste-alert"></p>
When a user attempts to copy and paste in to the text area we want the text:
"Please don't copy and paste"
To appear in the .paste-alert element
Can anyone help, this is driving me crazy?!