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

    I need a way to validate that a 10 digit numeric account number has been entered

    Asked by EssilorSalesOps on December 19, 2012 at 02:44 PM

    I have people wasting their time looking at requests that do not have valid account numbers.  Account numbers have to be a 10 digit number (as a string because it may start with a zero).

     

    How can i enforce this, or at least send a notification if this rule is broken?

     

    Really urgent!!!

     

    Thanks,

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

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 02:57 PM

    Hi,

    This is doable but would require getting a copy of the form's full source, embedding it into a web page and adding a script to the said page. I'll be back later today (Barbados time) with a solution.

    I'll be back.

  • Profile Image

    Answered by EssilorSalesOps on December 19, 2012 at 03:07 PM

    Look forward to it.  This solution wont break the google integration or anything I hope?  :-)

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 03:12 PM

    Hopefully not! (Murphy's Law: Anything that can go wrong will.) Honestly, I don't know but my colleagues should be able to shed some light on that. Somehow, I doubt that it will though.

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 03:29 PM

    Actually, the solution is simpler than I thought. Since you already have the field set to accept no more than 10 characters, you just need to set numeric validation on the said field.

    With the form loaded in the form builder, click the field and then the Validation button and then Numeric, as illustrated below:


    Save the form when done and it should work like this clone.

  • Profile Image

    Answered by EssilorSalesOps on December 19, 2012 at 03:52 PM

    I also need to make sure the field isnt less than 10 characters too though...  Also, forcing numeric will mess up the leading zero too, right?

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 03:58 PM

    Of course. Sorry about the misunderstanding. The source code will indeed need to be used. I already have a pretty good idea of the script needed. So, I shan't be too long. (Knock wood)

    As far as the leading zero is concerned, that shouldn't be a problem.

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 04:17 PM

    Hi again,

    Please test this form and let me know if it's working as you wish.

    Looking forward to hearing from you.

  • Profile Image

    Answered by EssilorSalesOps on December 19, 2012 at 04:22 PM

    This is working exactly as I need it to!  

    Just let me know what I need to do to get it up and running on my server and i'll be in business!

  • Profile Image
    JotForm Support

    Answered by abajan on December 19, 2012 at 04:53 PM

    Okay, great!

    Here's what to do:

    1. Get a copy of the form's full source, as explained in this user guide (Just copy the code highlighted in yellow: Don't click the "here" link to download the complete form files)

    2. Paste the code into the body of a web page of your choice

    3. Copy this code and paste it anywhere after the form's code (preferably, just before the web page's closing body tag, just like in the source of the demo)

    4. Save the changes

    That's pretty much it. Incidentally, with this alternative solution, there's no need to set numeric validation in the form builder because the regex in the script takes care of that.

    If you would like clarification on anything, we'd be happy to help.

    Do let us know how everything works out.

  • Profile Image

    Answered by EssilorSalesOps on December 20, 2012 at 10:49 AM

    We are using google sites.  it rejected part of the form source when I tried to use a html box to enter it?

     

  • Profile Image

    Answered by EssilorSalesOps on December 20, 2012 at 12:01 PM

    OK Hosted the page elsewhere and embedded it on our site as an iframe.

     

    Excellent work my friend!

     

    Please add the mimum field size as a feature request!!!!

  • Profile Image
    JotForm Support

    Answered by NeilVicente on December 20, 2012 at 12:53 PM

    @EssilorSalesOps

    Kindly open a new forum thread for your request so we can attach a ticket to it.

    Regards

  • Profile Image
    JotForm Support

    Answered by abajan on December 21, 2012 at 08:48 AM

    @EssilorSalesOps

    I'm really happy to know that this solution worked out for you.

    Thanks for the compliment :)


    Cheers