Nageen Chauhan on "[Plugin: WooCommerce Quick Donation] How to donate half euros??"

ساخت وبلاگ

Hi Cyberfox, many thanks!

I added step="any" to the html input, and it accepts decimals with a comma now (the desired behavior!).

But what if people enter a dot "."?
Currently using FireFox it throws a message "please enter a valid number", because it expects a comma as a separator.

But is there a way the dot converts into a comma automatically, to make it easy for the people?

I guess this snippet you mention is part of the solution: str_replace(',', '.');, but I don't know where to paste it exactly.

I guess within PHP tags at the top of the file, or maybe somewhere inside the html input itself?
Could some javascript make this conversion 'on the fly' possible as well?

Many thanks for any guidance.
I'll search by my side too and will report any advance.
Cheers,

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 243 تاريخ : سه شنبه 29 تير 1395 ساعت: 4:22