Is there a way to validate the specific entry in a form field?

  • Profile Image
    bardellp
    Asked on April 24, 2019 at 06:36 PM

    I am looking to validate an entry into a field on a jotform


    The field is USA Hockey IMR and the 4th digit in the entry must be "0"

    Field values are in this format 114000773ROGER (9 digits and 5 letters) 

    Is there any way to perform this type of validation on a forms field using JotForms

    Thanks

    Paul

  • Profile Image
    Welvin
    Answered on April 24, 2019 at 08:48 PM

    I think there's a way using a combination of a widget, textbox and conditional logic. I'll try and inform you here. 

  • Profile Image
    Welvin
    Answered on April 24, 2019 at 09:05 PM

    Yes, the workaround worked.

    Here's the demo form: https://form.jotform.com/91138371690964. Enter Values that don't have 0 as the fourth character/number, you'll see the result.

    1. It's the Substring widget configured like below:

    15561541092019-04-25-009.png

    The Source field ID box is different on your field so please check that.

    Guide to check the field ID: https://www.jotform.com/help/146-How-to-find-Field-IDs-Names.

    2. I've also added a text as a warning. You can do that same.

    3. The last part is the conditional logic that if the Substring widget Contains numbers from 1 to 9, it will show the Text warning.

    15561542382019-04-25-010.png

    You can add A to Z separated by a comma if you are not filtering the field to numeric. 

    Let us know if you need further assistance.

  • Profile Image
    bardellp
    Answered on April 26, 2019 at 12:19 PM

    Thanks - It worked perfectly!