Conditionally select a dropdown option based on another field

  • Profile Image
    lafhab2
    Asked on October 08, 2017 at 07: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? 

  • Profile Image
    jonathan
    Answered on October 08, 2017 at 09:16 PM

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


    Example result


    Let us know if you need further assistance.

  • Profile Image
    lafhab2
    Answered on October 09, 2017 at 05: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"

  • Profile Image
    jonathan
    Answered on October 09, 2017 at 08: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.


  • Profile Image
    jonathan
    Answered on October 09, 2017 at 08:17 PM

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

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