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

    Can a field type be changed after the fact without replacing it?

    Asked by afgcashout on May 07, 2016 at 08:31 PM

    I have a form with a number of text boxes on it that will really used to input numbers. I have also set up a lot of calculations, etc. Is there a way to change these to actually be number fields now without messing up my calculations? Alternatively, can I format the text boxes to be right justified and always carry two decimal places? Thanks in advance!

    Page URL:
    https://form.jotform.com/61276071891156

  • Profile Image
    JotForm Support

    Answered by EltonCris on May 07, 2016 at 09:34 PM

    No, it is not possible to change its field type. You have to delete the field and replace it with the field you want.

    However, did you know that you can change the textbox validation to numeric so it will only accept numbers, similar to a number field type?

    Example:

    --

    With regards to limiting the users input up to 2 decimal places, you can only achieve that by using form calculation field. Use this to filter inputs from a numeric field.

    Here's a visual guide on how to add form calculation to your form and limit 2 decimal places of the selected number input.

    ---

    If you want all numeric inputs to be aligned right, inject this CSS codes to your form.

    input[class*="[Numeric]"], input[type="number"] {

        text-align: right;

    }

    Guide: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes (paste it into the bottom part)

    Result:

    If you need further help, let us know.

  • Profile Image

    Answered by afgcashout on May 07, 2016 at 09:45 PM
    The CSS code you have at the bottom of your message looks like exactly what
    I'd like. Sadly, I don't understand this coding language so I need a tiny
    bit more help. Is there any way to have it format the number to always have
    2 decimal places so it would 322.00 in your example instead of 322? Said
    another way, I'd like to make these display like currency all the time
    regardless of if the input was .3 or 1 or .23 I'd like the form to display
    that as 0.30, 1.00 or 0.23. Can that be done with the CSS code since I set
    these all up as text fields inadvertently? Thanks much! The support for
    this site is AWESOME!!!
    Josiah
    PS: I have already set them all to use numeric validation...
    ...
  • Profile Image
    JotForm Support

    Answered by Kiran on May 07, 2016 at 10:37 PM

    Please see the screencast below that can help you with injecting CSS code to your JotForm.

    Since you are already using number field along with conditions on your JotForm, I think it is better to have an additional field to display on the form with decimal places.

    Now, add a condition to the form as shown below to display on the form in the required format.

    This should be displaying the number entered with decimal places on the newly added field.

    You may now hide the original field used for calculations on the form. 

    Hope this information helps!