In the shipping.tpl finding the input line below and adding onkeypress="return isNumberKey(event)" . I also applied this to the guest_shipping.tpl file.
Code: Select all
<input type="text" name="postcode"
Code: Select all
<input type="text" onkeypress="return isNumberKey(event)" name="postcode"
At the bottom of the template add the following script to define the function isNumberKey as a JavaScript function
Code: Select all
<script>
function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
} else {
return true;
}
}
</script>
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
https://css-tricks.com/snippets/css/tur ... -spinners/
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Jonathan, wonder if the spinner was causing the pass through issue. It works with the java script so I'm good with the solution.
Ah, got it.
siptec, no worries --- doing it server-side is probably a better solution, but using "number" for the input type should also work in most situations. I just wanted to post the link I found since I'd never seen the CSS to do that before.
Users browsing this forum: JessiesBoutique, pprmkr and 503 guests