How I can prevent two spaces are filled with the same name on the form?

  • GDISuperKids
    Asked on July 8, 2016 at 12:56 PM

    I have a registration form that I made but I will not allow the name of the mother or father is the same as the guardian of the child. Is there any way to prevent two fields are filled with the same name? Thank you very much for the answers.

  • Mike_G JotForm Support
    Replied on July 8, 2016 at 3:23 PM

    Yes, there is, with the help of conditions. 

    Here's a working form that I have created as example: https://form.jotform.com/61895141777972

    I have checked your form and notice that you are using the Full Name field for Father's Name, Mother's name, and Guardian Names on your form.

    How I can prevent two spaces are filled with the same name on the form? Image 1 Screenshot 80

    Since there is no way we can compare the value of it through conditions.

    How I can prevent two spaces are filled with the same name on the form? Image 2 Screenshot 91

    We need to pass it to a regular textbox field first and we are going to do this for all of the Full Name fields. On the image below notice that I have hidden the additional textbox fields so it will not show on the form.

    How I can prevent two spaces are filled with the same name on the form? Image 3 Screenshot 102

    Once you've done that, create the conditions that will pass the value of Full Name fields to its corresponding textbox counterpart.

    How I can prevent two spaces are filled with the same name on the form? Image 4 Screenshot 113

     

    Here's how it works suppose the textbox fields are not hidden.

    How I can prevent two spaces are filled with the same name on the form? Image 5 Screenshot 124

    Next, create the custom warning message that will be shown if the father and/or mother's name match or is the same as any of the guardian names.

    How I can prevent two spaces are filled with the same name on the form? Image 6 Screenshot 135

    Then finally, create a condition that will show the warning message and hide the submit button if any of the guardian names match either the father's name or mother's name.

    How I can prevent two spaces are filled with the same name on the form? Image 7 Screenshot 146

    That's it! You can apply the same to your form. I would suggest you clone the form I have used in my example so you can explore it. And, if you have questions with any of the instructions given above, please feel free to get back to us so we can further help you.

    Thank  you.