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 to validate a field based on another field?

    Asked by CMHForms on July 05, 2017 at 04:13 AM
    Also, for https://form.jotform.us/71795738084167, how do I validate a field value (example if the Grade is 12, the session has to be 1)
  • Profile Image
    JotForm Support

    Answered by Jim_R on July 05, 2017 at 04:52 AM

    From how you described it, you want to ensure that if users select Grade 12, they should only select Session 1, correct?

    If so, what you can do is add a Text Field that will show them a warning/error that they need to pick Session 1 if they selected Grade 12. Here's how this would be setup:

    1. Add a Text Field to your form that will show your warning/error message.

    e.g. You should select Session 1 if you select Grade 12

    2. Add a Condition similar to the one below:

    Related guide: How-to-Show-or-Hide-Fields-Base-on-User-s-Answer 

    Logic:

    IF Grade IS EQUAL to Grade 12 AND Session IS NOT EQUAL TO Session 1

    THEN SHOW the Text Field error AND HIDE the Submit button

    Result: