Any options to format number fields as dollars and/or decimal points?

  • Profile Image
    Brian Orr
    Asked on August 15, 2012 at 02:05 PM

    Any options to format number fields as dollars and/or decimal points?  I would like to have number fields that automatically format the numbers entered with either currency symbol or at least commas separating thousads.  Also, is there any support to format fields with decimals and/or percent symbols?

  • Profile Image
    oneil06
    Answered on August 15, 2012 at 04:41 PM

    At this current time I do not see any options to format the text fields to add in commas or currency signs.

  • Profile Image
    Mike_T
    Answered on August 15, 2012 at 04:48 PM

    Thank you for contacting us.

    Unfortunately, there is no way to do this via form builder. However, you can get your form source code, add some custom Javascript to that code in order to format number value. Then, publish that adjusted form source code to your website.

    You can check example here, just put some numeric value, then click anywhere on the page to see the difference. I have used Javascript from this page.

    Please feel free to contact us if you need any further assistance.

  • Profile Image
    jamesforpm
    Answered on September 19, 2014 at 11:12 AM

    I would like to use this script but unfortunately your first example is no longer accessible. Would it be possible to paste the script that will create a comma separated number string after clicking anywhere on the page?

  • Profile Image
    ashwin_d
    Answered on September 19, 2014 at 01:12 PM

    Hello jamesforpm,

    Please check the following URL where I have added the JavaScript code:  http://pastebin.com/9r16g9C6 

    Do check and get back to us if you have any question on this and we will surely help you.

    Thank you!

  • Profile Image
    jamesforpm
    Answered on September 19, 2014 at 01:59 PM

    Thanks for this. How would I trigger this function when the user leaves the text field? So no need to click a button.

  • Profile Image
    Mike_T
    Answered on September 19, 2014 at 03:14 PM

    Actually, now we have a better solution. There is a Masked Input widget available at JotForm.

    If you need any further assistance on this, please let us know.