How to have fields automatically populating based on selection of another field?

  • gustavoleo
    Asked on July 26, 2016 at 8:08 AM

    Hi There

    I would love to hearing your suggestions to the best way to create a field to make the Brazilian States an automatic output based on City selection or vice versa

    Here's some e.g. 

     

    How to have fields automatically populating based on selection of another field? Image 1 Screenshot 20

     

    Also I think we could optimize the drop down, if I pick STATE RO only RO cities should be selected.

    Theres any way to do it? On the case of Brazil we have 5566 cities and if do it manually will take a long long time...

    Cheers!

     

     

     

     

  • Nik_C
    Replied on July 26, 2016 at 10:01 AM

    What I thought of first is Autocompleted address widget:

    How to have fields automatically populating based on selection of another field? Image 1 Screenshot 40

    If you choose only to show City, Country and State for example:

    How to have fields automatically populating based on selection of another field? Image 2 Screenshot 51

     

    When your users enter the street it will auto-populate those fields:

    How to have fields automatically populating based on selection of another field? Image 3 Screenshot 62

    That might be the fastest way, but again depends on your requirements. Other way would be to have one drop-down field that will have States as options, and depending on which state is selected to show Cities for that state in other drop-down, you will have to input all those options manually(they can be copied and pasted though) and you will have to have number of conditions that match number of states.

    You could use also, in similar way, Autocomplete widget that automatically suggest the word when you type, I mean you can use it instead of drop-down field, but you will have to input options by yourself as well.

    Please let us know if any of these options could work for you.

    Thank you!

  • gustavoleo
    Replied on July 27, 2016 at 9:52 AM

    Nik Its sound great. We did it on the past. But we have encountered some difficulties

    The First was the source of the Addresses DB is Google Maps and accuracy is not good here in Brazil

    The second was the data output is a bit confused and we can't choose the parameters to display it on the spreadsheet e.g. one column for each field (Street name, House number,City,State,Postal code,Country)

    Autocompleted address fields

    How to have fields automatically populating based on selection of another field? Image 1 Screenshot 30

    Autocompleted address fields output

     

    How to have fields automatically populating based on selection of another field? Image 2 Screenshot 41

     

    There's any way to change it? or modify the code?

  • Chriistian Jotform Support
    Replied on July 27, 2016 at 11:49 AM

    Unfortunately, it is not possible to modify the code of the Autocomplete address widget. Another solution to your concern is to manually create this by using dropdown fields and conditions as also suggested by my colleague.