Post

1 follower Follow
0
Avatar

How can I force people to enter their email twice and not use copy/paste?

Frank Hagan

I love the "confirm email" field we can put on forms to force people to enter their email address twice, but have found several people that mistype the email and then just copy/paste it into the confirmation field. Is there a way to force them to type the email address out twice to catch these errors?

Official comment

Avatar

Yes, you can use a bit of JavaScript to disable the copy/paste function in their browsers. Paste this code into the Page > Settings > Custom Code > Footer section

<script>
window.onload = function() {
const myInput = document.querySelector('input[name="confirm_email"]');
if(myInput){
myInput.onpaste = function(e) {
e.preventDefault();
};
}
}
</script>

Here's a short video from our CEO explaining this, as featured in this Facebook User Community post.

 

Frank Hagan
Comment actions Permalink

Please to leave a comment.

1 comment