Skip Navigation

[Resolved] Use comma in numberfield in wp-admin

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by martijnH 2 years, 4 months ago.

Author
Posts
#2436559

We have a weird situation. And I don't know how this happened.
We had a custom field which was a number type.
And for some reason the dot didn't work and comma's did.
Yesterday out of nowhere comma's stopped working after almost a year, aside from updates nothing changed on the website.

My questions:

1) What is the default decimal character in toolset dot or comma?
2) Can this be changed? if so, how/where?
3) Does the situation I describe above sound familiar?

#2436639

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Types numeric fields use decimal points rather than commas.

The validation comes from the jQuery validation plugin (hidden link).

Types doesn't modify the default numeric validation in any way, so I don't think changes in the behaviour (going from dots to commas and back again) would reflect changes in Types; it may have occured because of some interaction with code from another plugin.

To change the behaviour you would need to enqueue custom JS on the admin pages that modified the jQuery validation options, bearing in mind this could have consequences if you intended to do anything with these numeric fields other than display them (e.g. use them in queries where a particular format was expected).

Although other users have requested the possibility to use commas instead of dots I haven't come across anything like you describe.

#2438689

Thank you for the detailed explanation. I know enough. We will convert all fields to the dot.