Specific Number Field

  • permissions_books
    Asked on April 10, 2014 at 2: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?

  • walledgarden
    Replied on April 10, 2014 at 2: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

  • Elton Support Team Lead
    Replied on April 10, 2014 at 2: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.

    Specific Number Field Image 1 Screenshot 30

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

    Visual guide:

    Specific Number Field Image 2 Screenshot 41

    Let us know should you have further questions. Regards!

  • permissions_books
    Replied on April 10, 2014 at 2: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

  • walledgarden
    Replied on April 10, 2014 at 2:59 PM

    @permissions_books,

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

    Bryan

  • permissions_books
    Replied on April 10, 2014 at 3: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?

  • Elton Support Team Lead
    Replied on April 10, 2014 at 3: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:

    Specific Number Field Image 1 Screenshot 20

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

    Hope this still helps!

  • permissions_books
    Replied on April 10, 2014 at 3: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?

  • permissions_books
    Replied on April 10, 2014 at 3:53 PM

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

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

  • KadeJM
    Replied on April 10, 2014 at 4: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:

    Specific Number Field Image 1 Screenshot 30

     

    Numberfield:

    Specific Number Field Image 2 Screenshot 41