What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How do I format a calculated field to be 2 decimal points?

    Asked by gongolfltd on June 23, 2014 at 01:49 AM

    I Have a calculated field that is used to apply a discount.

     

    The calculation works fine - but the results show the actual number - I want it to always show 2 decimals.

     

    Appreciate the help.

     

    Thanks

     

     

    Page URL:
    http://form.jotform.me/form/41728671237459

    format decimal thanks
  • Profile Image
    JotForm Support

    Answered by ashwin_d on June 23, 2014 at 03:59 AM

    Hello gongolfltd,

    Please be noted that by default, the decimal places are already allowed in the "Form Calculation" widget.  It will display the value in decimal but if there is no value after decimal it will not display ".00". For example if the calculation returns "1.12" it should display correctly but if it is "1.00", it will only display "1" as the output.

    Upon checking your form, I found that you have correctly and the decimal seems to display correctly except the ".00" which I have explained above. Please check the screenshot below:

    To be able to display the ".00" / "Empty decimal places", you need to select the "Show empty decimal places." option in the "Advanced Options" of your "Form Calculation" widget. Please chekc the screenshot below:

    I have fixed it in your form "GNL Booking Form". Do check and get back to us if your form is now working as expected.

    Thank you!

  • Profile Image

    Answered by silentnightllc on February 04, 2015 at 01:20 PM

    I see that the live form referenced in this question has two decimal places showing at all times. How can I make this happen as well. My form currently only shows the second decimal place when it is greater than zero.

     

    Thanks!

  • Profile Image
    JotForm Support

    Answered by david on February 04, 2015 at 02:42 PM

    Hi,

    Usually for older threads like this we ask that you create a new thread so that we may address your issue separately.  In this case however, the answer to your questions is fairly short so I'll keep it in this thread.

    In the "Advanced Options" in your calculation field, there is an option to set the number the number of decimal places for numerical values and to show empty places:

    If you have any further questions, please create a new thread so that we may address your issue properly.