How to Autoselect a Single choice field option based on previously selected option

  • Ed
    Asked on July 6, 2023 at 11:40 AM

    I want a field to automatically select the 'other' choice for a single choice field, once a choice called 'custom' (not using the 'other' choice) is selected on a preceding single choice field.

    This seems to work fine for normal choices, but not the 'other' choices. Is this not an option?

    Copying the value doesn't work. 'Custom' doesn't work. 'Other' doesn't work. Trying to use calculation values on the choice, also doesn't work.

  • Elbert_A Jotform Support
    Replied on July 6, 2023 at 12:15 PM

    Hi Ed,

    Thanks for reaching out to Jotform Support. It seems that you're logged in as a guest user. If you can share the link to your form, I can check it out and advise you on what you're looking for.

    Once we hear back from you, we'll be able to help you with this.

  • ed353
    Replied on July 7, 2023 at 6:26 AM

    When "select size" is set to "Custom", I'd like the single choice fields below to automatically select the "Other" (I've called it "Custom") option. Calculation function doesn't seem able to do this.

    https://eu.jotform.com/build/221724603840046

  • Eiron_O JotForm Support
    Replied on July 7, 2023 at 10:10 AM

    Hi Ed,

    Thanks for getting back to us with additional information. If you want to autoselect the Custom option in the single choice field when the Custom option is selected in the Select Size field, you need to match the options in the field. Let me show you how:

    • You can copy a field's value from a single-choice field to another single-choice field if they have the same option.

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 60

    • It should be an Option to Option, or Other to Other field. If you pass an Option to Other field option it will not work.

    How to Autoselect a Single choice field option based on previously selected option Image 2 Screenshot 71

    • You can create an Update/Calculate condition to copy a field's value to the field.

    How to Autoselect a Single choice field option based on previously selected option Image 3 Screenshot 82

    Here's the result:

    How to Autoselect a Single choice field option based on previously selected option Image 4 Screenshot 93

    Since you're using the Other option for the other single-choice fields, you need to use the Other option in your Select Size field. Here's a sample screencast:

    How to Autoselect a Single choice field option based on previously selected option Image 5 Screenshot 104

    Check out this Demo Form I created. You can clone the form to see how it was set up in the backend.

    That's it. Give it a try and let us know how it goes.

  • ed353
    Replied on July 7, 2023 at 11:54 AM

    Thanks for your help

    I was hoping to not need to require a text input, if there first option is required. But I understand if there isn't a work around. Not the end of the world, if not ideal.

  • Eiron_O JotForm Support
    Replied on July 7, 2023 at 12:06 PM

    Hi Ed,

    Thanks for getting back to us. If you don't want to use the text input of the Other field in the Select Size field, you need to change the other Single choice field to not use the Other field, but add a Custom option field. Let me walk you through it:

    • In the Select Size field, Disable the Other option by clicking on the Gear icon.

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 50

    • Create a Custom option in the choices.

    How to Autoselect a Single choice field option based on previously selected option Image 2 Screenshot 61

    • Do the same steps above to the Single choice field you want to pass the date with.

    How to Autoselect a Single choice field option based on previously selected option Image 3 Screenshot 72

    • Lastly, create the same condition to copy the value using the Update/Calculate field.

    How to Autoselect a Single choice field option based on previously selected option Image 4 Screenshot 83

    Let us know if there's anything else we can assist you with.

  • ed353
    Replied on July 11, 2023 at 10:39 AM

    Thanks for that
    Just to confirm, there is no way I can do both? Have the first option have a custom option without text input, but the later options do have the text input?

  • Eiron_O JotForm Support
    Replied on July 11, 2023 at 11:34 AM

    Hi Ed,

    Thanks for getting back to us. Unfortunately, passing the value of the Options in the Single Choice field to the Other option of another single-choice field is not possible. See the screencast below:

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 20

    While the feature you’re looking for isn’t currently available, rest assured we’re always working to add new services and features to Jotform. 

    I've gone ahead and escalated your request to our Developers. When or if it's developed depends on their workload, how viable it is, and how many other users request it. If there are any updates, we’ll circle back to this thread and let you know.

    In the meantime, let us know if you need any more help.

  • ed353
    Replied on July 12, 2023 at 7:26 AM

    Hi There,

    I'm still having problems with calculations. Either I'm misunderstanding something or there is an order of operations problem that I cant see.

    Goal: If adult is selected, all options change to the adult sizes. Same for Paed. If any options are changed, I want the size option to change to custom.

    I've tried to achieve this by having a number field that is set to 1 if all adult or paed options are picked, as well as if all are blank. If the number is ever not 1, this should change the size option to custom.

    However when I try this. The size option becomes unselected somehow, and the value I tried to change then defaults back (despite the size no longer being selected now). Because it forces the selection to revert, this means the number stays at 1 and doesn't change to the Custom size. If I spam click and force the different selection to change, the number still stays at 1. Even tho none of the conditions that would make the number 1 are being met.

    https://eu.jotform.com/build/231912431572350

  • Rose JotForm Support
    Replied on July 12, 2023 at 9:19 AM

    Hi Ed,

    I am currently working on your inquiry and need more time. I will get back to you shortly.

  • Rose JotForm Support
    Replied on July 12, 2023 at 9:27 AM

    Hi Ed,

    If you need to display adult, paediatric, or custom sizes based on the users, response. I suggest that you add separate fields for different size options. Then, you can add Hide/Show conditions to the form to display the corresponding size choice fields based on the user's option.

    For example, you have these fields:

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 60

    Then, add the following conditions to display the correct field based on the user's selection:

    How to Autoselect a Single choice field option based on previously selected option Image 2 Screenshot 71

    How to Autoselect a Single choice field option based on previously selected option Image 3 Screenshot 82

    How to Autoselect a Single choice field option based on previously selected option Image 4 Screenshot 93

    Here's the output on the demo form:

    How to Autoselect a Single choice field option based on previously selected option Image 5 Screenshot 104

    Please give it a try and let us know if you need any help.

  • ed353
    Replied on July 12, 2023 at 9:56 AM

    Hi Rose,

    The problem with that is I'd end up with 21 single choice fields instead of 7. That will be difficult to manage on the PDF editor. Acceptable if the no other ways to achieve my goal. However I'm still left with the same problem of how to change the size to custom, if any of the other choices are changed from the default.

  • Mary JotForm Support
    Replied on July 12, 2023 at 10:46 AM

    Hello ed353,

    Thanks for getting back to us. I didn’t fully understand the issue. To clarify, if the user would select "Custom" from the Size options, where would you want to direct them next?

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 30

    I was going over your form and saw that there's a field intended for Custom requests? If I understood what you’re asking, should they be directed to fill this part? Instead of selecting the size options showing below:

    How to Autoselect a Single choice field option based on previously selected option Image 2 Screenshot 41

    Or the scenario is, when the user selects "Custom", the value from "Custom" gets pass on to the intended Single choice fields. If this is the scenario that you would like to achieve on your form, then it requires multiple single choice fields for the condition to work. Since using the "Other" option. Currently, you can only pass the answer if it's an Option to Option, or Other option to Other option fields.

    Are you able to share a screencast where you encounter a problem with changing the size to custom, if any of the other choices are changed from the default? Loom is an example of a screencast application that you can use.

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • ed353
    Replied on July 12, 2023 at 11:24 AM

    I'm using a simpler form to try this out on. https://eu.jotform.com/build/231912431572350

    Example of the button resetting by itself linked below. I can't see any conditions that would do this.

    I can see its doing what I want for a split second, because a number box that only appears when Custom is selected on the Armgroove Size choice, can be seen briefly.

    If I click the option enough time, it works. Seems to be at random intervals, so I don't think its the conditions.
    https://gyazo.com/891b1a51963e3b44d3d3ef7779972107

  • ed353
    Replied on July 12, 2023 at 11:41 AM

    Sorry, found another problem


    I also want the ArmGroove Size choice to automatically change back, if the defaults have been changed, then changed back to the original. So if it starts as the default size, adult, and I click another option for Armpad Size, it will change to Custom size. If I then change the Armpad Size back to the default, I want the size to return to 'adult'


    However if I change from the default, it changes all the options to the other option.


    I'm certain the conditional logic is correct, but maybe I'm not understanding how it works.


    The rule:

    https://gyazo.com/ae13c7725fda8a0feea5e7da4e25b9ed


    The problem:

    https://gyazo.com/6ce2f5c524c65448f61fb195e6e1b324

    Update:
    It now removes all the selections, if I try change from the defaults. I then can't select anything.
    https://gyazo.com/9ca5c32907e59f8aa229ad9b1cfd6cb1

  • Kim JotForm Support
    Replied on July 12, 2023 at 12:42 PM

    Hi ed353,

    Thanks for patiently waiting. I checked your form and found out that you have a condition that determine the value of a field. Checkout my screenshot below to see:
    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 20
    This conditions will break when you manually selected a value as your condition is set to insert a value to your single choice property. Would you like to set a condition but you can still choose the option manually?

  • ed353
    Replied on July 13, 2023 at 2:37 AM

    Yes, thats what I'd like to achieve.

    If you select the adult or paed size, the other options should populate themselves. If you change one of the options, I'd like the size to change to custom.

  • Kenneth JotForm Support
    Replied on July 13, 2023 at 5:27 AM

    Hi ed353,

    Unfortunately, this functionality creates conflicts with the conditions since fields already have value due to options from ArmGroove Size. As a suggestion, you can use the Paragraph field to indicate the details Height, Length, etc, for the ArmGroove Size(Adult), another for ArmGroove Size(Paediatric), and finally use the set of single choice fields for Custom, that way, predetermined values are clumped together on a single table cell.

    If you have any further questions, please let us know.


  • William JotForm Support
    Replied on July 13, 2023 at 6:28 AM

    Hi Ed,

    Thanks for getting back to us. Based on how the form is currently working, it tells that there are conditions that are conflicting and thus would run like that in based on your recording. Since the conditions that you have is too complex, what I can suggest is to find these conditions that are going circular.

    Somehow I'm getting an overview that your field ArmGroove Size is a source of executing a condition to show/hide fields or insert values but at the same time, those values are throwing back a condition to ArmGroove Size. This causes some conflict in how your condition functions.

    How to Autoselect a Single choice field option based on previously selected option Image 1 Screenshot 20

    So what you need to do is you don't have to push a condition going back up to a single choice field (radio button field) when that radio button field is also running a condition as a source for an IF condition.

    Let us know if you have more questions about this or if you need more help in understanding your conditions.