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

    How can I show Field Validation errors only upon hitting the submit button and not when the field loses focus?

    Asked by RogerYelvington01 on April 17, 2017 at 12:41 PM

    I'd like to show the "this field required" message for questions only if the question has not been completed.

    How do I do this?


    Thank you!

    Page URL:
    https://form.jotformpro.com/70504486114956

  • Profile Image
    JotForm Support

    Answered by Jim_R on April 17, 2017 at 01:24 PM

    Hello 😊 I checked your form and it already works the way you described it - the "this field required" message for questions only shows up if the question has not been completed

    Or are you perhaps hoping to remove the field validation onblur, meaning when the user leaves the focus on one field then moved to another. If so, I'm afraid that's not possible. Field Validation happens on 2 instances:

    1. When a field loses focus (onblur)

    2. When the submit (in your case, the NEXT) button is hit

    This is just the default behavior of field validation and something that can never be overridden. If it's imperative to go in this direction, the only possible workaround is to do this outside JotForm.

    What I mean is, you grab the Full Source code of the form, then implement your own logic for field validation upon your (or your developer's) discretion.

    Related guide: How-to-get-the-Full-Source-Code-of-your-Form 

  • Profile Image

    Answered by RogerYelvington01 on April 17, 2017 at 01:29 PM

     

    reply :)

    https://youtu.be/IOkf24Vhcco

  • Profile Image
    JotForm Support

    Answered by Jim_R on April 17, 2017 at 02:13 PM

    Thanks for the video - What you explained appears to be covered on the latter part of my reply (the onblur field validation). To quote what I posted:

    Or are you perhaps hoping to remove the field validation onblur, meaning when the user leaves the focus on one field then moved to another. If so, I'm afraid that's not possible. Field Validation happens on 2 instances:

    1. When a field loses focus (onblur)

    2. When the submit (in your case, the NEXT) button is hit

    This is just the default behavior of field validation and something that can never be overridden. If it's imperative to go in this direction, the only possible workaround is to do this outside JotForm.

    What I mean is, you grab the Full Source code of the form, then implement your own logic for field validation upon your (or your developer's) discretion.

    Related guide: How-to-get-the-Full-Source-Code-of-your-Form 

    In case you need more help, don't hesitate to ask.

  • Profile Image

    Answered by Roger  on April 17, 2017 at 02:17 PM

    Oh, I thought it would be possible to only show the field errors at the point the submit button is hit.

     

  • Profile Image
    JotForm Support

    Answered by Jim_R on April 17, 2017 at 02:40 PM

    Sadly, it's not possible, Roger. The errors will always show up either once the field loses focus or once the Submit button is clicked.

  • Profile Image

    Answered by RogerYelvington01 on April 17, 2017 at 02:46 PM

    as a work around - what would the code be to hide the error message labels?

  • Profile Image
    JotForm Support

    Answered by Jim_R on April 17, 2017 at 03:11 PM

    Removing the "This field is required." error message can be done with CSS. Add the following codes to remove them:

    .form-line-error {

      background: none transparent;

    }

     

    .form-error-message, .form-required {

      display: none !important;

    }

     

    .form-validation-error {

      -moz-box-shadow:none;

      -webkit-box-shadow:none;

      box-shadow:none;

    }

    Result:

    I'm seeing you already have a handful of Custom CSS on your form so I'm sure you know where to place these 😊 Give it a whirl and let us know if you'd need more help.