Skip to Content
Menú
This question has been flagged
1 Respondre
4438 Vistes

Hi, I have a text field.

my_field = fields.Text()

I want to disable copying and paste(ctrl+c, ctrl+v) from intput with java script or python. How i can do it, thanks.

Avatar
Descartar
Best Answer

Hi Pavel,

This thing you can do with the jquery event handlers cut, copy & paste.

Code: 

    $ (document) .ready (function () {

       $ ('# txtInput'). on ("cut copy paste", function (e) {

          e.preventDefault ();

       });

    });

Thanks ....

For more information Contact us:- https: //kanakinfosystems.com/odoo-development-services

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de gen. 21
44
2
de des. 23
12815
3
de jul. 22
23191
2
de juny 21
18608
0
de set. 20
3747