Hello,
Some may remember, (probably on the old forum) I reported an issue (which was verified with others) on orders.php where if you put an extra space after an order number in the order no: input box, the page then slowly de-constructed in front of your eyes. Quite impressive but unwanted. Using Chrome anyway.
I'm sure this has been fixed in later versions but I have V.1.0.5.0.
Is there 'A-B,0-9' validation I could add to that input box? It happens fairly frequently as we copy and past order numbers.
orders.php - i/p validation
- zipurman
- Builder
- Posts: 540
- Joined: Tue Oct 13, 2020 5:20 pm
- Phoenix Version: v
- Has thanked: 93 times
- Been thanked: 162 times
Re: orders.php - i/p validation
You could add something like this using a hook targeting the footer.
Make sure to change the "input[name='update_name']" to what ever element target you are targeting.
Code: Select all
<script>
$(function(){
$("input[name='update_name']").on("keyup", function(){
var order_number = $(this).val();
$(this).val(order_number.replace(/[^A-B0-9]+/g, ""));
});
});
</script>
zipurman
-----------
-----------