how to change .
to ,
on input type='number'
in html5, couse in my country for fraction use ,
not .
. i'll process it into .php
OPTION 1. use <input type="number" lang="en" value="13.5">
if you want .
, and if you want ,
(comma) use lang="your-language"
. and it will change automatically to a comma
BROWSER SUPPORT : this is not supported in every browser ( Chrome doesn't support it, Mozzila FF does. ) . so you might want to use another solution
see here more about this solution :lang input[type="number]
see snippet:
<input type="number" lang="en" value="13.5">
<input type="number" lang="ro" value="13.5">
OPTION 2
you could use the php function str_replace()
see more here > str_replace()
or other similar SO questions > replace dot with comma1 and replace dot with comma2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With