Number field does not accept decimals in Chrome

  • Profile Image
    Phil
    Asked on January 13, 2014 at 10:06 AM

    The number field does not accept decimals in Google chrome.  Input is allowed, but when the user submits the form, they get an error message and are instructed to enter a valid number (whole numers only).  Decimals are accepted on the same form in Firefox.  Is there a way to make the number field fully functional in Chrome?  I have seem this problem addressed in other posts, but the response seems to be to switch it to a text field which is not a great option for a form that is already collecting responses as deleting the number field and replacing with a text field would create inconsistencies in the associated database.

    Alternatively, can a number field be switch to a text field without deleting it and creating a new field?

     

     

  • Profile Image
    abajan
    Answered on January 13, 2014 at 10:56 AM

    Actually, Firefox is handling the input incorrectly and Chrome is adhering to the standards specified by W3C (the World Wide Web Consortium). Unfortunately, in the form builder a field type cannot be switched without deleting the current field and replacing it with a new one.

    The only workaround I can think of would be to substitute the form's full source for its default embed code and then manually change the tag of the GPA field. Change the tag as shown here. The result should be like the clone in this page. (You'll see the change in the source on line 555 with the original tag commented out on the previous line.)

    Would this work for you?

  • Profile Image
    abajan
    Answered on January 13, 2014 at 11:04 AM

    Actually, now that I've perused the article to which I referred, it looks like you may only need to include a step attribute (step="any") in the original tag. I'll have to test that though. If that is indeed the case, perhaps we can include that option in the preferences for number fields. That would certainly be much more user friendly than having to use the form's full source code.

  • Profile Image
    abajan
    Answered on January 13, 2014 at 11:26 AM

    You know what? Without altering the tag, in the latest release of Chrome (Version 32.0.1700.72 m) I'm able to submit the form after entering any floating point number in the number field. Of course, we would still need to accommodate your users. So that may just be academic.

  • Profile Image
    abajan
    Answered on January 13, 2014 at 11:42 AM

    It would still be nice to have Step added to number field preferences in the form builder though.

  • Profile Image
    mrsecehr
    Answered on January 16, 2014 at 07:26 AM
    Not really. I use the same form for multiple applications and don't want
    to alter the source code in each page every time there is a minor revision-
    the embed option is much more convenient. I guess we will just have to
    manually alter the submissions in our database
    As over all feedback on the form builder- allowing a more robust number
    field (i.e. accepting decimals) would be far more useful and intuitive than
    requiring use of a text field to collect numerical input
    Thanks for the response
    ...
  • Profile Image
    mrsecehr
    Answered on January 16, 2014 at 07:26 AM
    Agreed.
    Thanks for continuing to look into the issue
    On Mon, Jan 13, 2014 at 10:04 AM, JotForm Support Forum <
    jotform@jotmails.com> wrote:
    ...
  • Profile Image
    Rajesh M 
    Answered on March 03, 2017 at 05:37 AM
    Answer must be a valid number (no decimals)
  • Profile Image
    Boris
    Answered on March 03, 2017 at 09:02 AM

    Thank you for your input, Rajesh, though you've responded to a support thread that is over 3 years old. If you needed any assistance, please simply open your own dedicated support thread in our forum, and we'll be happy to help:

    https://www.jotform.com/contact

    Thank you!

  • Profile Image
    Adolfo 
    Answered on March 12, 2017 at 10:10 PM

    Answer must be a valid number (no decimals)

  • Profile Image
    Sharon Britton 
    Answered on June 05, 2017 at 11:39 AM

    I try to put the numbers without the decimal for my applications and it says the number cant be greater than 99 and ask how many year of experience i put 4years and it still wont go though
  • Profile Image
    BDAVID
    Answered on June 05, 2017 at 01:03 PM

    @Sharon Britton, your question will be addressed on a separate thread here: https://www.jotform.com/answers/1163743 

  • Profile Image
    mandeep 
    Answered on June 11, 2017 at 01:14 AM

    1 year 

  • Profile Image
    Aditya Saxena 
    Answered on July 25, 2017 at 08:30 AM

    9years ko velid number mai kese likhge