Support

Account

Home Forums ACF PRO Allow / force comma instead of dot in number field

Solved

Allow / force comma instead of dot in number field

    • tille

    • January 8, 2021 at 11:42 pm

    hi,

    due to regional formatting conventions (Germany) I would need the number field to be able to accept commas. Ideally the field would either force the use of commas, as it currently forces the use of dots – or even better would be an automatic transformation of dots to commas, if an editor decides to use dots.

    I hope I’m just missing something and that this or something similar is possible.

    thank you very much!

    ps: since i couldn’t open a support ticket (“Error – Failed to send”) I’ll try it here in the forums. Apologies if this is not the right place to ask for support… :/

  • Dots vs commas is controlled by and built into the browser and is not a function of ACF, all ACF does is output <input type="number"> What the browser does is dependent on where the user is and that person’s browser setting for language, in some browser.

    • tille

    • January 12, 2021 at 11:20 pm

    This of course didn’t really solve my problem of having editorial staff with different language browsers – but at least now I know what causes the problem.

    I read that adding a language marker to the field could force the numbers’ format… like this:

    <input type="number" lang="en">

    Is there any way to add such a language marker to the number field?

    Thank you very much!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.