Hi there.
How can I prevent adding decimals in a number field?
It should only be 0-9 and no , or .
If found a script (from 2020) on the forum here, but it crashes my WP.
Any idea?
Number fields have a min/max and an increment settings.
Min: 0
Max: 9
Increment: 1
It’s easy to overlook, especially with the new UI.
I’m also trying to find a way to only allow an integer in a number field.
With John’s suggestion, the result is that only numbers <10 are allowed, and users can still input 5.000 when they want to input 5000 (am I making sense 😉 ? )