You need to sign in to do that
Don't have an account?
Robert Wambold 10
Is it possible to prevent user from pasting data into a text field?
Hello all,
I have a request to prevent users from pasting data into a text field, is this even possible?
Thanks in advance for your help!
Robert
Yes, this functionality is possible
You need to use HTML event attribute, example-
Component:
Controller.js:
Reference: https://salesforce.stackexchange.com/questions/247097/how-to-add-a-functionality-to-stop-copy-paste-on-an-input-field-in-lightning
Related:https://stackoverflow.com/questions/15320069/how-to-prevent-user-pasting-text-in-a-textbox
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Hi Swetha,
Thanks for the link and code! I created the Code and Controller, but how to I get it work on Case object field?
Robert
CustomField, Case.Client_Internal_Impact__c
Type = TextArea