Is there a way to pre-populate a text field based on a dropdown selection field?

  • IvanSamsung
    Asked on August 30, 2019 at 7:58 AM

    Hi,

    I've been stuck for a while and searching through different options on how I can pr- populate a dropdown based on my selection.


    My form: https://form.jotform.co/92413457322857

    Please follow > In Store Support > 12. 1 Wk Not picked up > 'Select' Store > (Form to pre-populate trading hours as a list.


    I've found a thread below which similar to what I'm looking for except my pre-populated dropdown is a list.

    https://www.jotform.com/answers/329165-Is-there-a-way-to-pre-populate-a-text-field-based-on-a-dropdown-selection-field


    Example from the link above:

    https://shots.jotform.com/ashwin/Clone%20of%20Listing%20Only%20Order%20Form_(40371245828960)/Clone%20of%20Listing%20Only%20Order%20Form.html


    Is there a way this can be done. Thank you

  • Richie JotForm Support
    Replied on August 30, 2019 at 9:54 AM

    To clarify, do you want to prepopulate your dropdown options based on conditions?

    Unfortunately, there is no option for the dropdown field to be populated dynamically or through conditions.

    You may try to add different dropdown fields with different options and show the field based on conditions.

    For example, if you choose Sydney in your Store you will show a dropdown field with its trading hours.

    Is there a way to pre populate a text field based on a dropdown selection field? Image 1 Screenshot 20

    Another way would be using the Form's full source code. You would have to download the Form's source code and edit your dropdown field with scripts and upload it to your server.


  • Ivanwork
    Replied on August 30, 2019 at 10:27 AM

    Hi Richie,


    To clarify, do you want to prepopulate your dropdown options based on conditions?

    Exactly.


    You may try to add different dropdown fields with different options and show the field based on conditions.

    I've attempted different widgets, but most mention if I start a new line then this will be another option (which is not what I am looking to do).

    Mon 9-5

    Tues 9-5

    Wed 9-5

    etc 


    I will leave source code as a final option as I am not familiar with this. 

  • Richie JotForm Support
    Replied on August 30, 2019 at 10:55 AM

    My idea was to create multiple dropdown fields with each dropdown field  having different options.

    Then depending on the Store we will show that specific dropdown field.

    As we cannot populate the dropdown field using conditions, we can only add static options.

    Example screen cast:

    Is there a way to pre populate a text field based on a dropdown selection field? Image 1 Screenshot 30

    Sample Condition:

    Is there a way to pre populate a text field based on a dropdown selection field? Image 2 Screenshot 41

    Please give it a try and let us know if this fits your requirements.