Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4380 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
jan. 21
44
2
dec. 23
12735
3
jul. 22
23107
2
jun. 21
18563
0
sep. 20
3720