Hi,
I have a requirement where there are two fields: "Enter Email Address" and "Re-enter Email Address". The form should not allow the user to cut-and-paste the Email Address into the Re-enter field. It must be manually entered. Can this be done through javascript? Or by setting form properties with LiveCycle Designer? I'm using Es4 version. I am aware that i can restirct user from copying content within form. Solution to retrict pasting will be highly appreciated.
Thanks in advance,
Radhika
Solved! Go to Solution.
Hi,
you can check if the Ctrl-Button is pressed while the new value is entered in a field.
So you can at least avoid pasing through Ctrl + V key combination.
if (xfa.event.change.length > 1 || xfa.event.modifier === true ) {
xfa.event.change = "";
}
Views
Replies
Total Likes
You can add a JavaScript script in the change event to check how long the inserted value is.
When users types in the value it will be 1 but when the value is pasted it will be longer.
if (xfa.event.change.length > 1) {
xfa.event.change = "";
}
Hi radzmar,
This works perfectly fine as long as the field is an email address.
But in other case, if i have "Text Field1" rawvalue to have 1 character entered, it wil still copy that 1 character to other field.
Can we restrict user from copying the value itself so that he has no way to paste it at all?
Thanks,
Radhika
Views
Replies
Total Likes
Hi,
you can check if the Ctrl-Button is pressed while the new value is entered in a field.
So you can at least avoid pasing through Ctrl + V key combination.
if (xfa.event.change.length > 1 || xfa.event.modifier === true ) {
xfa.event.change = "";
}
Views
Replies
Total Likes
This worked radzmar!
Thanks
Radhika
Views
Replies
Total Likes
Hey radzmar,
I'd be grateful if you could look in the below thread and provide a solution. I see you have answered a few questions there.
Re: How to force alpha or numeric inside text fields - LiveCycle Designer 9.0
Thanks,
Radhika
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies