What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

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

    Asked by gustavoleo on July 26, 2016 at 08: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. 

     

     

    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!

     

     

     

     

    JotForm autocomplete field based selection
  • Profile Image
    JotForm Support

    Answered by Nik_C on July 26, 2016 at 10:01 AM

    What I thought of first is Autocompleted address widget:

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

     

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

    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!

  • Profile Image

    Answered by gustavoleo on July 27, 2016 at 09: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

    Autocompleted address fields output

     

     

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

  • Profile Image
    JotForm Support

    Answered by Chriistian 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.