Specific Number Field

  • Profile Image
    permissions_books
    Asked 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?

  • Profile Image
    walledgarden
    Answered 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
    EltonCris
    Answered 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
    permissions_books
    Answered 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
    walledgarden
    Answered 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
    permissions_books
    Answered 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
    EltonCris
    Answered 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
    permissions_books
    Answered 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
    permissions_books
    Answered 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
    KadeJM
    Answered 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: