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

    Specific Number Field

    Asked by permissions_books on April 10, 2014 at 02:14 PM

    Hello,

    For my current forms, I would like our customers to put a certain number of characters (numbers, specifically) into a field and I am finding that it is always one digit short.

    Is there a way to ensure that a customer enters exactly 13 digits into a specific field (no less or no more)

    What is the difference between the Size (Set number of characters users can enter) property and Max Size (Maximum allowed characters for this field) fields?

    Page URL:
    http://form.jotformpro.com/form/32894437536970

    style size font max size
  • Profile Image

    Answered by walledgarden on April 10, 2014 at 02:42 PM

    Hello Permissions_Books,

    Size refers to the size of the field, where maxsize restricts the user from entering more than the set number of characters.

    To answer your second question, you need to inject a javascript code to perform that action. Maxlength can only restirct the number of characters but does not require them to enter specific number of characters.

    Bryan

  • Profile Image
    JotForm Support

    Answered by EltonCris on April 10, 2014 at 02:47 PM

    Hi,

    Size actually refers to the width of the number field while Max Size refers to the number of digits users can enter.

    In that case, you need to set Max Size of 13. So when user enters more than 13 digits, they will be prompted with an error.

    Another solution is to enable Input Mask. Use hash symbol # to accept numbers only.

    Visual guide:

    Let us know should you have further questions. Regards!

  • Profile Image

    Answered by permissions_books on April 10, 2014 at 02:50 PM

    Thank you, I believe I did try the input mask feature, however I am concerned that they are not entering enough numbers so of course, they do not get an error message prompting that the field is incomplete. 

    Are there plans to require to enter a specific number of digits in the next upgrade?

    Thank You both for your help!

    Chandreyi

  • Profile Image

    Answered by walledgarden on April 10, 2014 at 02:59 PM

    @permissions_books,

    At the moment, the only solution to that is by using javascript. Hopefully JotForm will have that feature soon.

    Bryan

  • Profile Image

    Answered by permissions_books on April 10, 2014 at 03:04 PM

    I tried the input mask for numbers only and comes up red (like above) if only 12 digits, as opposed to 13 is entered.

    Is there a way I can enter a message for the error letting them know we need 13?

    Please take a look?

  • Profile Image
    JotForm Support

    Answered by EltonCris on April 10, 2014 at 03:19 PM

    @permissions_books

    Sorry I missed the description nor more, no less. :)

    Anyway, I think the workaround here is to add a minimum value with 13 digits. e.g. 1000000000000. So this requires the user to enter 13 digits to be exact.

    Example:

    Demo: http://form.jotformpro.com/form/40994965082972?

    Hope this still helps!

  • Profile Image

    Answered by permissions_books on April 10, 2014 at 03:51 PM

    YES! That may work and is there a way to enter a message if a customer to let them know 'Need exactly 13 digits.' when they come across a red box and is unsure what that means?

  • Profile Image

    Answered by permissions_books on April 10, 2014 at 03:53 PM

    OOPS - just realized I do not have this option available on my screen only MAX size.

    http://form.jotform.us/form/31674845427159

  • Profile Image
    JotForm Support

    Answered by KadeJM on April 10, 2014 at 04:58 PM

    That is happening because you're not using the Number Field. I can clearly see you are using a Textbox for this. The textbox currently does not have a min option, only max so that is why.

    Textbox:

     

    Numberfield: