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.
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.
format decimal thanks
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.
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.
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.