How to format numbers with dollar signs and decimals

  • zoiglobal
    Asked on August 22, 2017 at 5:46 PM

    Hello!

    Can you please guide me as to how to format the output values to contain dollar signs ($), commas (,) and decimal points (.) when necessary on my form?

    Thank you in advance for your great support!

    Denise

  • Kevin Support Team Lead
    Replied on August 22, 2017 at 7:28 PM

    It is possible to use the a comma to separate large quantities, you only need to add the "commaseparate" function to your form, please find more about this and other functions on the following link: https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference 

    To set the number of decimal places and the symbol to be used for decimals, you could do this under the widget options: 

    How to format numbers with dollar signs and decimals Image 1 Screenshot 30

    How to format numbers with dollar signs and decimals Image 2 Screenshot 41

    Now, regarding the dollar sign, you will need to manually add it to your calculation as there is not a function to format the result as money. The dollar sign can be added using your keyboard, just like if you were adding text. 

    You could also add a widget to your form in order to format the numbers, please check this guide that will provide you with more details about it: https://www.jotform.com/help/381-Getting-Started-with-the-Basics-of-Input-Masking 

    I hope this helps.