stormy Posted December 19, 2011 Share Posted December 19, 2011 I just ran into a problem that affects .es domains: ESNIC doesn't accept uppercase characters in the email address. I suppose this could be fixed with a hook or something like that, but I'm not enough of a coder to figure it out myself. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted December 19, 2011 Share Posted December 19, 2011 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} 0 Quote Link to comment Share on other sites More sharing options...
stormy Posted December 23, 2011 Author Share Posted December 23, 2011 Thanks for the help! I was hoping it could be done server-side, although users will have javascript enabled anyway so it shouldn't be a problem. 0 Quote Link to comment Share on other sites More sharing options...
stormy Posted December 23, 2011 Author Share Posted December 23, 2011 I couldn't get the code to work. I know it's missing the javascript opening and closing tags, anything else? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted December 23, 2011 Share Posted December 23, 2011 Nope, that should be it. I havent tested it though, so your results may vary. Make sure the form ID is correct and the code is on the proper page. Also, the javascript must be wrapped in the {literal} tags in the template. 0 Quote Link to comment Share on other sites More sharing options...
stormy Posted December 24, 2011 Author Share Posted December 24, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.