How to limit the decimal place of a field?

  • Profile Image
    Asked on July 07, 2021 at 05: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?

  • Profile Image
    Answered on July 07, 2021 at 08:09 AM


    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.y-yOx52ZDhJm9YO934IVWfovvOe8k9rlw25O8NPi

    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.zklA6O6J47z0e-fm2QuyOxWnR0vfNnM3GHjqAMrK

    If you require any further information, please don't hesitate to reach us!

    Thanks for using JotForm.

  • Profile Image
    Answered on July 07, 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?

  • Profile Image
    Answered on July 07, 2021 at 01:48 PM


    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.