Jump to content

Customer cannot login. Safari Browser generates white spaces after zip and email.


Recommended Posts

Add the following code to your head: 
<script language="javascript" type="text/javascript">
function removeSpaces(string) {
 return string.split(' ').join('');

Use the following code for your text field: 

 <input type="text" onblur="this.value=removeSpaces(this.value);">
 <input type="button" value="Click">


i am using prestashop 1.6.x. and previews versions since years.


I cannot solve this Problem at customer authentification.

i tryed it with JavaScript to delete all White spaces after leving the Input field.

But it does not work for me.


The customers of my onlineshop are 50+ old. Some of them uses apple and Safari.

If they type in there adresses Safari adds automatically a White space after the Name, email, ...

This is a big Problem because the customer gets the message emailadress not valid

zip not valid

I have already customized the error massage to ask to delete all White spaces.

But not everyone sees the whitespaces behind the email or zip.


This must be a Problem on all prestashops.

but i cant find a solution!


Please help

Thank you



I have tryed the attached Code:



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...