Jump to content

Convert email address to lowercase


stormy

Recommended Posts

I'd probably fix it client side with some jquery on the order form. Something like this should work. Just drop it in the template where you have the email field. You may have to change "mainfrm" to whatever the id of the form is on the page.

 

{literal}
$('#mainfrm').submit(function() {
   var email = $('input[name="email"]').val();
   email = email.toLowerCase();
   $('input[name="email"]').val(email);
   return true;
});
{/literal}

Link to comment
Share on other sites

This code works for me:

{literal}<script type="text/javascript">
$(function() {
$('#mainfrm').submit(function() {
   var email = $('input[name="email"]').val();
   email = email.toLowerCase();
   $('input[name="email"]').val(email);
   return true;
});
});</script>
{/literal}

 

Thanks a lot! Maybe it could be moved to the "how to" forum.

 

Here's a related topic, about converting domains to lowercase (I think that's not needed anymore though):

http://forum.whmcs.com/showthread.php?t=34877

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated