How can I eliminate options from a dropdown box for subsequent fields

  • scbar
    Asked on October 27, 2020 at 10:34 PM

    I have a form in which there are three options for selecting a Plaintiff Witness and three options for selecting a Defense Witness. I would like to be able to eliminate the option selected from each of the subsequent witness dropdown fields. Is there a conditional logic to accomplish this? This would prevent a scoring judge from accidently assigning the same witness in multiple locations on the form.


    Thanks.

  • Mustafa Culban JotForm Developer
    Replied on October 28, 2020 at 3:22 AM

    Hi scbar,

    You can try the Dynamic Dropdown Widget which updates the next dropdown option base on the selected option in the first dropdown.

    Please let us know if you need further assistance on this matter and kindly update us on whether this option works for you.

  • scbar
    Replied on October 28, 2020 at 8:35 AM

    I don't think the dynamic widget will work because the fields are in different parts of the form. If you look at the form link the three Plaintiff Witness names are spread out in different areas, as are the Defense witnesses.


    thanks,

  • scbar
    Replied on October 28, 2020 at 9:19 AM

    In the alternative, is there a way to flag and prevent submission if the same name is selected more than once in the dropdown boxes?

  • Bojan Support Team Lead
    Replied on October 28, 2020 at 10:23 AM

    Greetings.

    This can only be achieved using conditional logic. You can add the paragraph field with the error message to display if the same names are selected. In this case, you can also hide the submit button.

    To get started, you first need to add the Show/Hide field condition:

    show hide fields Screenshot 10

    In it, you need to check if all your fields have the same name selected (you can add more conditions by selecting the plus sign at the right):

    screenshot 2538 Screenshot 21

    Also, make sure you select "All" underneath the condition:

    screenshot 2539 Screenshot 32

    Finally, you can show the paragraph field and hide the submit button:

    screenshot 2540 Screenshot 43

    Now you need to repeat this for every name you have.

    I've created a test form for you to test. You can access it on the following link:
    https://form.jotform.com/203014640520034

    Feel free to clone the form to your account to see the conditions. You can click here to see how to clone the form.

    Let us know if this solution will work for you.