How to validate a field based on another field?

  • Profile Image
    CMHForms
    Asked 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
    Jim_R
    Answered 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: