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

    Can I set a multiple character limit in one text field?

    Asked by wirelessunltd on August 11, 2013 at 09:43 PM

    I have a requirement of validating the length of a cell phone serial number. It can only be 3 different lengths: 8, 11, or 14 characters. How do I do this?

    http://jotformpro.com//?formID=31670820913956

    Page URL:
    http://jotformpro.com//?formID=31670820913956

    field length length 3 style size font mandatory validate
  • Profile Image

    Answered by khrisell on August 11, 2013 at 10:08 PM

    Hello,

    I am afraid we cannot set a multiple character limit on your form.

    However, a workaround would be the best way to achieve a limitation on the character to input.

    This is through Conditional logic.

    A sample to that is..

    We need to put a radio button that would say, "Please choose the number characters of your cellphone serial number" and there will be 3 option to choose from. Then once they have chosen 1 option(ex. 3), a text field will show up that would allow them to input only 3 characters.

     

    For you to be able to visuallze it clearly, I have created a form that will let you do that. Feel free to test it.

    http://form.jotform.me/form/32227901073447

     

    Kindly let us know if this will do for you so that I can walk you through the process on how I have created this form.

     

    Thank you and hoping to hear from you soon.

  • Profile Image

    Answered by wirelessunltd on August 11, 2013 at 11:10 PM

    This may work as long as it doesn't rename the text field based upon the radio button selected. This information is fed to a pre-coded php script and if I changed the jotform field name, it would break that script.

  • Profile Image

    Answered by khrisell on August 11, 2013 at 11:25 PM

    Hello,

    For this I have created 3 textfield for the condition to work.

    I just hide the unselected textfields. 

    Here's the condition to that form.

    Here's the original look of the form.

    Please let me know if you have further clarification on the form I have created. 

    Let me know if we could start now with the direction on how to do this if you still want this kind of option on your form.

     

    Thank you

  • Profile Image

    Answered by wirelessunltd on August 11, 2013 at 11:46 PM

    Can I have the form transfer the serial number to the pre-named field after it has met the field length requirement? This way, I don't have to pay a programmer to have the server-side script re-written.

  • Profile Image

    Answered by khrisell on August 12, 2013 at 12:00 AM

    Hello,

    For the submission data to be posted on your PHP script automatically, you need webhook for that.

    This feature would replace Send Post Data + Custom URL Thank You Page workaround in order to help you transfer forms data to your own database using your own script codes.

    To know more about Jotform Webhooks, please click here.

     

    Let us know if you have further clarifications.. Thank you.