How to conditionally add an option to the multiple choice field

  • Akyri
    Asked on September 20, 2024 at 2:46 AM

    Hello!


    i am in the midst of creating one form, but i have a need to make the form more efficient and ergonomic for the assignee. The current hiccup i am facing is trying to see if multiple short text inputs filled out in the beginning of the form would be able to be populated as options to be selected in a multiple selection element.


    For reference i have attached an image with the form elements that i am using and hoping to work. I have attempted to use conditional logic but it doesn't appear to work in this circumstance.


    With reference to the image: would it be possible for example Room name 1 "garage" to be populated as an option under the "removal of skirting boards section"


    Many thanks in advance

    Jotform Thread 19205881 Screenshot
  • Kobe JotForm Support
    Replied on September 20, 2024 at 3:28 AM

    Hi Akyri,

    Thanks for using Jotform. Unfortunately, it's not possible to dynamically add a selectable option to the multiple choice field based on the input on a text field. If you can share us more details of your use case and what you're trying to achieve, we can try to come up with an alternative solution.

    If you have limited number of cases of what users will be typing in to the room name, you can create a static condition. To do that, you'll need to add another multiple choice field which has the garage as an option, and show it conditionally based on whether the word garage was typed in to the room name or not. If that works out for you, let me walk you through it:

    First, we'll add another multiple choice field. Let's do it:

    1. In Form Builder, click on Add Element.

    2. Click on Multiple Choice field.

    3. Click on an option and type in Garage.

    How to conditionally add an option to the multiple choice field Image 1 Screenshot 60

    Now, we'll hide the other multiple option field and create a show condition for the second option field we've created. Let me show you how:

    1. Right click on the first multiple choice field.

    2. Click on Hide.

    3. Now, at the top of the page in the orange navigation bar, click on Settings.

    How to conditionally add an option to the multiple choice field Image 2 Screenshot 71

    4. Click on Conditions.

    5. Then, click on Show/Hide Field.

    How to conditionally add an option to the multiple choice field Image 3 Screenshot 82

    6. Set your conditions as:

    IF: Room Name

    STATE: Is Equal To

    TARGET: Value

    VALUE: garage

    DO: Show

    Field: Type a question 2

    7. Finally, click on Save. That's it.

    How to conditionally add an option to the multiple choice field Image 4 Screenshot 93Here is a screencast of the final result:

    How to conditionally add an option to the multiple choice field Image 5 Screenshot 104

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

Your Answer