How to prevent that form is submitted unless certain number of characters is entered inside of the field?

  • ipbr21054
    Asked on January 31, 2017 at 3:20 PM

    When the customer selects HONDA from my list up will pop the field saying enter FULL VIN etc etc.

    Can we add code to this.

    The VIN MUST be 17 characters,so if they only type7 the form will send to me.

    I need some kind of check so the form will only send when 17 characters are typed,so if they type only 3,10,15 or even 25 a message will pop up etc.

    Along those lines anyway.

    You have a suggestion or can edit my current form to allow/do this please.

  • BJoanna
    Replied on January 31, 2017 at 3:39 PM

    If I understood you correctly you want to prevent your users to submit the form if number of characters that is entered inside of "FULL VIN ..." field is not equal to 17 characters. 

    You can achieve this my enabling Input Mask option for that field. You also need to check "Fill Mask Validation" option.

    Use @ symbol to mask letters, # for numbers and * for both.

    On my demo form I used *.

    How to prevent that form is submitted unless certain number of characters is entered inside of the field? Image 1 Screenshot 20

    Here is my demo form: https://form.jotform.com/70306242274953? 

    Feel free to test it and clone it

    Hope this will help. Let us know if you need further assistance. 

  • ipbr21054
    Replied on January 31, 2017 at 3:43 PM

    Hi

    That looks good.

    Can you apply that to one of my forms

    I can then follow it and make changes to my other forms.

     

    This then saves me cloning again etc,thanks

  • ipbr21054
    Replied on January 31, 2017 at 3:57 PM

    Hi,

    If i clone it you are using an old example.

    Here is the new updated form 70304482166351

     

    Then apply the new17 code please.

    The old code you are using is out of date.

  • AIDAN
    Replied on January 31, 2017 at 4:02 PM

    Hi,

    I can see that your updated form 70304482166351 already has the input mask set correctly.

    Before you sent your latest reply, I applied this input mask on your form 62115565434352.

    If you need further assistance please let us know. We will be happy to help. Thank you.

  • ipbr21054
    Replied on January 31, 2017 at 4:07 PM

    ok thanks.

    It makes sense that if only 17 characters will be allowed in the box i think the box should be the size as if 20 characters were added "size wise etc"

    Also make sense to center this input field.

    Correct ?

  • NeilVicente
    Replied on January 31, 2017 at 5:11 PM

    Hi,

    Your form was modified to reflect the changes you desire.

    Do inform us if you need further assistance.

    Thanks!

  • ipbr21054
    Replied on January 31, 2017 at 5:16 PM

    Hi,

     

    Which form did you apply it to ?

     

    Thanks.

  • NeilVicente
    Replied on January 31, 2017 at 5:18 PM
  • ipbr21054
    Replied on January 31, 2017 at 5:28 PM

    Ok

    Cache playing catch up.

     

    Thanks

  • ipbr21054
    Replied on January 31, 2017 at 5:50 PM

    Sorry me again,

    Lat question.

    If the customer only enter say 15 characters up pops the message Field Value Must Fill Mask.

     

    Can this message be edited to my liking ?

     

    Thanks

  • Mike_G JotForm Support
    Replied on January 31, 2017 at 7:14 PM

    Yes, you can edit the form warnings through the Form Warning wizard that can be accessed under Preferences.

    How to prevent that form is submitted unless certain number of characters is entered inside of the field? Image 1 Screenshot 30

    How to prevent that form is submitted unless certain number of characters is entered inside of the field? Image 2 Screenshot 41

  • ipbr21054
    Replied on January 31, 2017 at 9:46 PM

    Hi,

    Form 70304482166351

    Can you advise where i need to make the adjustment so the field shown in photo supplied can be made a little wider.

    I ask because scrolling through the names in the list some are only just shown in the box thanks.

     

    How to prevent that form is submitted unless certain number of characters is entered inside of the field? Image 1 Screenshot 20

  • Mike_G JotForm Support
    Replied on January 31, 2017 at 11:02 PM

    @ipbr21054

    Considering your most recent response is a different concern, I have moved it to a new thread that you can access by clicking this link.

    Thank you.