How to validate a field with a set of correct answers ?

  • jena04
    Asked on December 10, 2018 at 9:59 AM

    Dear customer support team,

    I have five questions. Please read below and thank you for your time.



    Question 1:

    Can I limit the number of submission to only one based on the user's email?


    Question 2:

    How can I combine two fields?


    Question 3:


    I would like to create narrative fields with audio embedded. You can think of this form as a dictation. For example: the user will listen to an audio as they complete the form with the missing words. 


    Question 4:

    How can I prevent the user to go back to the previous question? Only the "next" button should be available.



    Question 5:

    I would like to block the user from moving to the next question until they get the first question right. How can set a condition to the field so that the answer has to be equal to an exact value before the user can move on? I see that you can a validation rule that matches alphabetic, numeric or email. But that is too general. Let's me give you an example of what I am looking to do.

    Example: the required question is: enter a valid student ID.

    (the possible answers to that question are: student1, student2, or student3)

    If the user does not type any of these possible answers, the validation rule would prevent the user to move on. As a result, the user will not have access to the form.



     I am looking forward to your reply.

    Thank you very much for your time.

  • Nik_C
    Replied on December 10, 2018 at 12:54 PM

    1) Yes, you can do that with unique question limit option: https://www.jotform.com/help/223-How-to-set-Form-Limits-Based-on-a-Unique-Question, you can choose that email field is a unique question.

    2) You can combine with conditions, for example:

    1544463891Screen Shot 2018 12 10 at 6 Screenshot 10

    You can check how it works here: https://form.jotform.com/83434637784973

    3) You can use some of the existing widgets:

    -Narrative Fields, where users can fill the missing parts of the text:

    1544464034Screen Shot 2018 12 10 at 6 Screenshot 21

    -Audio widgets, so you can embed the audio:

    1544464079Screen Shot 2018 12 10 at 6 Screenshot 32

    4) You can do that in Page break field's properties:

    1544464206Screen Shot 2018 12 10 at 6 Screenshot 43

    5) You can do that with Show/Hide condition:

    1544464371Screen Shot 2018 12 10 at 6 Screenshot 54

    So if a certain field is not equal to student1, student2 etc, page break (where the next button is) will be hidden:

    1544464435screencast Screenshot 65

    Let us know if you have any further questions.

    Thank you!

  • jena04
    Replied on December 10, 2018 at 2:34 PM

    Thank you for your answer. But question #5 is not working. Did I do it correctly ?1544470443Screen Shot 2018 12 10 at 2 Screenshot 10

  • Nik_C
    Replied on December 10, 2018 at 3:39 PM

    I tested your form and it looks like it's working:

    1544474331screencast Screenshot 10

    Let us know if you have any further concerns.

    Thank you!

  • jena04
    Replied on December 11, 2018 at 7:35 AM

    Yes, it does work. Thank you.

    Do you know how I can add an error message to it? For example: if a user types student0, the message would say "please enter a valid student ID.

  • Victoria_K
    Replied on December 11, 2018 at 12:15 PM

    You can add a Text element to the form to hold text of error message:

    How to validate a field with a set of correct answers ? Image 1 Screenshot 30

    Then, the error can be included in the condition that checks student IDs:

    How to validate a field with a set of correct answers ? Image 2 Screenshot 41

  • jena04
    Replied on December 11, 2018 at 12:42 PM

    Thank you for your response.

    By doing this the error message is shown even before the user types anything. I want the error message to show only if the user answers. Is there anyway to do that?

  • Nik_C
    Replied on December 11, 2018 at 2:12 PM

    You can control the showing of such text error field by using this condition:

    1544555522Screen Shot 2018 12 11 at 8 Screenshot 10

    So you have to make sure that field is filled and it is equal to what you need.

    That way the error field will show only when the field is not properly filled.

    Thank you!

  • jena04
    Replied on December 11, 2018 at 2:32 PM

    It is working. Thank you