Show/hide multiple choice options based on conditional logic

  • jagarolik
    Asked on November 1, 2021 at 2:40 PM

    Hello,

    I am building a dynamic roll call attendance sheet for a fire department. I had previously asked questions in this thread, but as my line of questioning started going all over the place I am creating a separate thread in hopes to keep the topic singular.

    Scenario
    I have a multiple choice question corresponding to each of our 35 or so firefighters. The options that they can be selected for include which fire engine they respond to, (Engine 1, Engine 2, etc.) as well as meeting attendance (present, absent), or other attendance-based options.

    Desired Outcome
    The number of options for each multiple choice answer are too many. I would like to show/hide fields based on whether the roll call is for a meeting, training, or emergency incident. This way I could include every possible option in each firefighter's multiple choice question, but simplify the user experience for the person taking the roll call, by hiding irrelevant options based on conditional logic of whether the form was marked for meeting, training, or emergency incident, etc.

    Summary
    Is there any way to show/hide multiple choice options based on conditional logic?

    Thanks

  • Jovanne JotForm Support
    Replied on November 1, 2021 at 6:11 PM

    Hi, thank you for contacting support.

    Do you mean these options on your Multiple Choice fields present on your form?

    1635804405 618064f57d432  Screenshot 10

    Unfortunately, you cannot be able to display selected items based on the purpose you have chosen on the form. The Show/Hide Field condition is only capable of showing/hiding fields such as Multiple Choice fields but not the items that are available on it as these are added statically.

    If you wish to have an alternative solution, I would suggest preparing different form pages for each of the purposes and setting each Multiple Choice field options based on the purpose selected.

    Please give it a try and let us know if you need further assistance.

    Thank you.

  • jagarolik
    Replied on November 1, 2021 at 6:19 PM

    Hello, yes, those are exactly the options I am looking to show/hide.

    Unfortunately, the result of creating separate form pages will add a significant amount of work and complexity to the project. In order to do this, I will need to:

    • have 35 multiple choice fields on each page, and there then need to be 4 pages, totaling 140 multiple choice fields.
    • Because we need reporting for this attendance, I will then need to significantly customize the reports system to make sure that all all 140 multiple choice fields are grouped together by name so that individuals can see only their data
    • Also have just as many conditional logic arrangements so that whenever somebody is marked on the form they get an email.

    You can surely see why it would be most beneficial for our use to just have one multiple choice field per person, as that will eliminate a significant amount of work.

  • Jovanne JotForm Support
    Replied on November 1, 2021 at 7:37 PM

    Hi,

    I totally agree with the things you have mentioned at the top since it would add up to the complexity of the form you are trying to work with. As much as I want to exhaust the capability of the field, but once you declare the contents of the multiple-choice field, it would no longer be edited or manipulated dynamically using conditions.

    How about creating separate forms for each purpose? Do the reports need to be generated by purpose also?

    Please let us know.

    Thank you.

  • jagarolik
    Replied on May 2, 2022 at 2:56 PM

    The purpose of keeping things in the manner I describe is that it allows for a report to be simply put together based on each member of our department.

    This form is intended to be how we keep track of attendance at trainings, meetings, and at emergencies. For each firefighter, there are options to designate the following:

    • For trainings and meetings
    • Present
    • Absent
    • Excused
    • For emergencies
    • Station 1
    • Engine 1
    • Engine 3
    • Tower 1
    • Tanker 1
    • Forestry 1
    • Ambulance 1
    • Ambulance 2
    • Boat 1
    • Station 2
    • Engine 2
    • Engine 5
    • Forestry 2

    It would be best to have multiple choice checkbox fields for each firefighter that:

    1. actually have all of these options available so that they correspond to the respective firefighter in the report; but
    2. that the choices can be filtered/hidden based on other factors to make the process simpler, such as (i) selecting whether it's a meeting, training, or emergency, or (ii) if they are at station 1 or 2.

    We have dozens of firefighters and this is too much information to sort through in order to populate these fields with any ease. The alternate option is to create 6 forms, one for each station for trainings, meetings, and emergencies, all of which would populate different reports which completely defeats the purpose.

  • Jovanne JotForm Support
    Replied on May 2, 2022 at 4:25 PM

    Hello Christopher,

    Thanks for getting back to us. We now have a widget that I think would be useful for your concern. Can you please try adding the Dynamic Dropdown widget to your form and check if this will help you? You can check this guide to know more. To add the widget, please follow these steps:

    • Go to your Form Builder and click the Add Form Element.
    • Go to the Widgets and search the Dynamic Dropdown.
    • Add the options in the widget's values and click the Update Widget button.

    1651523090 62703e12aa1f1  Screenshot 10

    Here is my demo form: https://form.jotform.com/221215866044048

    Give it a try and let us know if you need any other help.