Thousand Separator

Support Meta Box AIO Thousand Separator

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35340
    JanosJanos
    Participant

    Hi all,

    I try to add thousand separator to my Metabox number value. I tried one solution (https://support.metabox.io/topic/multimask/), but I should have updated my fields all over the CPT, quite a some, so I have been trying to use a different solution.

    I have found this simple one, however it is not working:
    document.getElementById("demo").innerHTML.toLocaleString("en-US", {style:"currency", currency:"USD"});
    The output is the original value. Could you please help? What should I do to make this work? Or is this solution is a dead-end?

    Thank you!
    J

    #35350
    Long NguyenLong Nguyen
    Moderator

    Hi Janos,

    The field type multimask of the custom plugin also saves the raw value (number) into the database like the field type number. It just helps you to display the number in a formatted style. So I think you can install that plugin then create a new custom field using that field type and the same field ID to display the number in a formatted style.
    https://github.com/badabingbreda/field-text-multimask

    You can also contact Didou, the author of this plugin to ask for more information https://www.facebook.com/groups/153766748574311/user/100002815898663/

    #45978
    artur.art7@gmail.com[email protected]
    Participant

    Hi, any other option for thousands separator?
    After activating the plugin any fields are not available.
    https://share.cleanshot.com/0RQJXvf9

    #46491
    victoria de clascavictoria de clasca
    Participant

    same issue to me what is the solution?

    #46503
    PeterPeter
    Moderator

    Hello,

    If you want to have the separator, you can try to use the text field and sanitization custom callback. Please follow the documentation https://docs.metabox.io/sanitization/

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.