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


Allow / force comma instead of dot in number field

  • 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.

  • 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!

  • Hi,

    same issue here. Frontend is showing dots instead of a regional comma. However, when I edit the values in the backend, there is a comma.

    Browser is set to a European format, so the number field should be formatted correctly. However it does not. And it is only happening with ACF fields, all other formats are printed correctly as well.

    For example, I want to include this shortcode into a blog post: [acf field="p_proc" post_id="1561"].
    Backend: 2,5
    Frontend: 2.5

    Is there anything we can change/edit to get commas instead of dots?

    Thanks and cheers

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

You must be logged in to reply to this topic.