Is it possible to have a calculated field with thousands mask?

  • pablogutierrez
    Asked on June 5, 2017 at 12:41 PM

    Hi Jotform Team!

    We have created a calculated field and it works great. However, we have 2 questions:

    * How can we set "thousands" in the number fields (example: 5000 to 5.000). We used to do it with masks but the new Jotform version doesn't show it.

    *  How can we set "thousands" in the calculated field (example: 5000 to 5.000). Same issue as above.

    Thanks a lot.

  • AIDAN
    Replied on June 5, 2017 at 2:09 PM

    While I am not aware of an option that allows you to add a comma separator to the number field, here is how to achieve that using the form calculation widget:

    1. Click on the 3 dots icon as shown here:

    Is it possible to have a calculated field with thousands mask? Image 1 Screenshot 30

    2. Select the commaSeparate() function as shown here:

    Is it possible to have a calculated field with thousands mask? Image 2 Screenshot 41

    This allows you to add any field inside this function, including this form calculation field itself.

    I hope this helps. If you need further assistance please let us know. Thank you.

  • pablogutierrez
    Replied on June 5, 2017 at 2:57 PM

    Hi Aidan,

    Thanks for your answer. We did what you said for the calculated fields but now they are blank and not showing any result: https://form.jotformz.com/71518007634655

    We need to comma separators and 0 decimal places.

    Can you please check?

    Thanks a lot.

  • David JotForm Support Manager
    Replied on June 5, 2017 at 5:58 PM

    Please try the following:

    1) Delete the  "Precio Establecido" text field.

    2) Add the Masked Input widget instead, and name it "Precio Establecido": https://widgets.jotform.com/widget/masked_input 

    3) Add a another Form Calculation widget(and hide it),and name it as "Precio", which you will use to obtain the value entered in the Masked Input widget.

    Is it possible to have a calculated field with thousands mask? Image 1 Screenshot 60

    4) Update your calculations, and make sure to put the formulas in parenthesis, so you will have double parenthesis for them to work, example:

    Is it possible to have a calculated field with thousands mask? Image 2 Screenshot 71

    5) In order to avoid zero decimal places, follow these steps:

     1. Click on the 3 dots icon as shown by my colleague:

    Is it possible to have a calculated field with thousands mask? Image 3 Screenshot 82

     2. Then click on OPTIONS, and set the decimals to zero:

    Is it possible to have a calculated field with thousands mask? Image 4 Screenshot 93

    Here is the result of my clone version: https://form.jotformpro.com/71556566280967 

    Is it possible to have a calculated field with thousands mask? Image 5 Screenshot 104

    You can clone and use it if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you need more help.

  • pablogutierrez
    Replied on June 5, 2017 at 7:56 PM

    Hi BDavid,

    Thanks for your specific tutorial! It worked PERFECTLY.

    Thanks again.