• Resolved MasG

    (@dhevilz)


    hii.. can you tell me how to make a responsive Symbol for grouping thousands and Decimals separator symbol?

    for example, when I want to write 100,000, but I write the wrong number, so the number I write becomes 1,000,000

    but when i remove one zero, writing thousand becomes 1,000.00

    can i get a code so that when i delete the last one digit, the thousands group will rewrite it automatically?

    I include a video link, I hope you can understand it

    Video Link

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @dhevilz

    Thank you very much for using our plugin. Please, follow the steps below:

    1. Go to the menu option “Calculated Fields Form > Troubleshoot Area & General Settings”, untick the “Activate Javascript Cache” checkbox, and press the “Update” button.

    2. Open the “/wp-content/plugins/calculated-fields-form/js/fields-public/fbuilder.fcalculated.js” file with the text editor of your choice

    2.1. Go to the piece of code:

    var v = me.val(true, true);

    And edit it as follows:

    var v = me.val(false, true);

    3. Finally, if you are using WP Rocket or any other cache-handling plugin, please, purge the website and browser caches.

    We will include the modification in the next plugin update.

    Best regards.

    Thread Starter MasG

    (@dhevilz)

    Not working for me

    Plugin Author codepeople

    (@codepeople)

    Hello @dhevilz

    You have no edited the file, please, look at the screenshot below:

    The correct would be: var v = me.val(false, true);

    Best regards.

    • This reply was modified 1 year, 11 months ago by codepeople.
    Thread Starter MasG

    (@dhevilz)

    oh, sorry I haven’t cleared cloudflare cache yet,

    now the code has changed but not the way I want

    from 1,000,000 when I delete the last digit
    which should be 100,000
    but now show 1,000

    Plugin Author codepeople

    (@codepeople)

    Hello @dhevilz

    My apologies for the inconvenience. Please, edit the piece of code:

    var v = me.val(false, true);

    as follows:

    var v = me.val(true, true);
    v = (v+'')
    .replace( new RegExp( '[^\\-\\d'+me.decimalsymbol.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')+']', 'g' ), '' )
    .replace(/[^\d\-]/g, '.');

    Best regards.

    Thread Starter MasG

    (@dhevilz)

    decimal simbol and grouping not working, but this function is work

    Plugin Author codepeople

    (@codepeople)

    Hello @dhevilz

    You removed an extra line of code from your plugin copy:

    this.value = $.fbuilder.calculator.format(v, me.configuration());

    Best regards.

    Thread Starter MasG

    (@dhevilz)

    the output is still the same.
    when inputting 1.000.000 the result will read the number 1.000.000

    but when the input was deleted one last digit

    in the input field that was 1.000.000 will display 1.000.00

    and in the results, the number (1.000.00) reads as 1,000 (one thousand) instead of reading 100.000 (one hundred thousand)

    if it can, in the input form also change

    when the initial 1.000.000, removed one to 1.000.00 will automatically rewrite to 100.000

    Plugin Author codepeople

    (@codepeople)

    Hello @dhevilz

    Please, watch the following video. I included the recommended code in my plugin copy (the modification will be included in the next plugin update), and the values are formatted properly in the onchange and onblur events:

    https://resources.developers4web.com/cff/tmp/2022/12/09/video-grouping_o.mp4

    Best regards.

    Thread Starter MasG

    (@dhevilz)

    Okay thanks,
    i will look forward to the next plugin update

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘grouping thousands and separator symbol’ is closed to new replies.