How to setup a conditional logic to avoid duplicate entries in two fields.

  • mvpgators
    Asked on July 3, 2019 at 2:44 PM

    This form shows how to use "if, state, target and field" in "show/hide field" conditional logic to avoid duplicate entries in two fields https://form.jotform.com/91154723657966

    This is exactly what I need, but I cannot figure out how to get the "target" option to appear in the conditional logic box.

  • David JotForm Support Manager
    Replied on July 3, 2019 at 4:35 PM

    So, you want to accomplish the same as in that demo form? Could you please specify on which of your forms you would like to apply it and also the fields that should not have the same values?

  • mvpgators
    Replied on July 3, 2019 at 5:29 PM

    I would like to use it on this form  https://form.jotform.com/91820065821150

     

    Also, the fields that should not have the same values are "Stroke 1" and "Stroke 2"



  • David JotForm Support Manager
    Replied on July 3, 2019 at 7:45 PM

    Thanks for the details, the Target option in the show/hide conditions is available for input fields(textboxes) only:

    1562195857target Screenshot 10

    That is the reason why you don't see the option for your Single Choice fields(radio buttons). However, please try this workaround:

    1) Add a text field below those fields:

    1562195274textfield Screenshot 21

    2) Assign a value to each option that Stroke 1 and 2 fields have, the values should be the same for each option on both fields, example: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    1562197307values1 Screenshot 32

    1562197354values2 Screenshot 43

    3) Add two Form Calculation widgets to capture the values of both fields, example:

    1562196108calculations Screenshot 54

    4) Then you will be able to create a condition like the following: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer


    1562197245final Screenshot 65

    Result: https://form.jotform.com/91837354443967

    1562197450formresult Screenshot 76

    You may clone my form version if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    Let us know if you need more help, we will be glad to assist you.

  • mvpgators
    Replied on July 4, 2019 at 8:32 AM

    Thanks very much for your solution, it was fantastic.  I really appreciate it