Conditionally select a dropdown option based on another field

  • lafhab2
    Asked on October 8, 2017 at 7:48 PM

    Hi, I'm sure it was once possible to pre-select a drop-down option based on the value of another field, but now I can't seem to achieve this.

    Using prepopulate I have Field A which is given a 3-letter word, I have another field which I want specific options to be selected based on Field A.

    Similar to say using airport codes, the prepopulate URL might say airportcode=LAX (which is inserted into a text box), on a dropdown field called 'Airport' containing a list of airports the airport 'Los Angeles International' might then be automatically selected.  In this example, airportcode = text box, and airport = dropdown list. I need to keep it this way as I am using conditional value to display specific fields later in the form.

    I'm sure this was once possible? 

  • jonathan
    Replied on October 8, 2017 at 9:16 PM

    This is still very much possible. The condition logic can be like this.

    Conditionally select a dropdown option based on another field Image 1 Screenshot 30


    Example result

    Conditionally select a dropdown option based on another field Image 2 Screenshot 41


    Let us know if you need further assistance.

  • lafhab2
    Replied on October 9, 2017 at 5:27 PM

    Thanks, but I'm not sure you understand what I'm asking. I don't want to copy a field's value - please read my question again.

    To further explain:
    Using prepopulate in a URL, a field on my form is being prepopulated with a 3-letter code. I then have a separate field which has a dropdown with 4 options, I want one of these options to be selected based on the 3-digit code.

    In my 'airports' example, I want to make the following logical argument.

    (((airportcode=3-digit text box
    airport=dropdown list of airports)))

    If airportcode="JFK" then airport="John F Kennedy"
    If airportcode="LAX" then airport="Los Angeles International"
    If airportcode="LHR" then airport="London Heathrow"
    If airportcode="MEM" then airport="Memphis"
    If airportcode="PHL" then airport="Philadelphia"

  • jonathan
    Replied on October 9, 2017 at 8:06 PM

    Please test my form https://form.jotform.com/72807846054967 also to get a better understanding on how it works.

    The 'copy field's value' you see in the conditions is not copy per se.

    It actually selects the option in the Dropdown list. So you can see it in the dropdown field as the selected value.


  • jonathan
    Replied on October 9, 2017 at 8:17 PM

    I updated my test form to reflect the idea you described.

    Conditionally select a dropdown option based on another field Image 1 Screenshot 20

    If you typed the value JFK, LAX, LHR in 3 digit code field, it should select the appropriate value in Airport dropdown list.