If two separate name fields are equal, do not allow user to proceed.

  • cornerstonechrysalis
    Asked on June 12, 2018 at 8:56 AM

    Good morning,

    I am currently working with a client to design an online application.

    JotForm has been great, as it's offered more options than they could ever need. You'll see on the URL I've included that the first page of the form has the following fields:

    Candidate Name Candidate Email Address Sponsor Name Sponsor Email Address

    Currently, I have validation set up, so that if the same email is entered for Candidate & Sponsor, the Next button disables, and an error is displayed. This is perfect for our needs.

    However, I need to be able to do the same thing for the Name fields. Is there a way to do that?

    I'm currently using the default 'Name' option in the Form Designer. I assume I could probably each of those fields with one 'Short Text field' and validate it that way (if the two text fields match, disable the Next button)?

    Is that the best plan? Hopefully this makes sense. Thanks in advance!

  • Ashwin JotForm Support
    Replied on June 12, 2018 at 11:06 AM

    Yes that is the correct way to achieve your requirement. You can add two "Form calculation" widgets for both full name fields and then add condition to check if they are equal to show / hide the next button of form.

    Please take a look at the following cloned form and see if it works as expected:   https://form.jotform.com/81624589513968

    Feel free to clone this form for a closer look. The following guide should help you in form cloning:  https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Hope this helps.

    Do get back to us if you have any questions.