-
indoorsmanufacturingAsked on July 7, 2021 at 5:05 AM
How can I have a text box field or number field to only accept inputted numbers to one decimal place before I do a calculation?
-
esraari JotForm Data ScientistReplied on July 7, 2021 at 8:09 AM
Hi,
You can use the Input Mask feature inside of the Short Text element. The following steps may help you with this.
Step 1: Drag and drop the Short Text element to your form
Step 2: Click Properties
Step 3: click OPTIONS from the opened sidebar
Step 4: arrange your text format in the Input Mask field.
PS: use # for masking numbers whereas @ for Letters. In your case, I believe you will only use the numbers which is #. Also, as a separator any special character you can select like comma or point.
Let’s test it. For your use case, I preferred to use a full stop(.) as a separator and put only one hash(#) to indicate the number. Here how it works.
If you require any further information, please don't hesitate to reach us!
Thanks for using JotForm.
-
indoorsmanufacturingReplied on July 7, 2021 at 10:23 AM
I have the case where a user may type in numbers like the following. 2150.5 or 350.5 or 56.5 how can this be done.
So it could be a 5 digit, 4 digit of 3 digit number which includes the full stop that may be entered by the user.
I tried what you suggests but that only work for one situation with exact number of digits.
is there another solution?
-
Basil JotForm SupportReplied on July 7, 2021 at 1:48 PM
Hi,
There isn't any other way to limit the decimal places entered in a field.
It is possible to limit the decimal places for the data appearing on your submissions page by adding a calculation field and limiting it to one decimal place but the user will still enter as many decimals as they wish.
Please let us know if you require any further assistance.