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

    Autocomplete city based on zip code

    Asked by semory on January 08, 2013 at 05:10 PM

    Is there any way to integrate the JS from this link?

     

    http://bassistance.de/2009/03/03/jquery-snippet-autocomplete-city-based-on-zip-code/

     

    Thanks!

  • Profile Image
    JotForm Support

    Answered by jonathan on January 08, 2013 at 05:56 PM

    Hi,

    To be able to use JS codes outside JotForm, you will have to use the form's source code.

    I am not sure yet how you wanted to utilize this, but there is an autocomplete field in JotForm found in power tools. If you can put the list of city and zipcodes into the lists, it should work also similarly to the jquery code you mentioned.

     

    I created a test form http://www.jotformpro.com/form/30076931041950 

    Try to fill in the auto zip code field with a US zip codes for cities that start on letter A.. i.e. 13608 (Antwerp), 04330(Augusta).. so on.

    Please inform us if this is something you can use already.

    Thanks.

     

  • Profile Image

    Answered by semory on January 08, 2013 at 08:57 PM

    Thanks for the response. The autocomplete in your example might be a good plan B if I can't get the JSON script to work.

  • Profile Image

    Answered by semory on January 08, 2013 at 09:23 PM

    Hi, Is it possible to change the value of an input with javascript by targeting the ID of the respective input? Trying to get JSON data to input the value of a couple inputs but it's not working.

     

  • Profile Image

    Answered by jeanettebmz on January 08, 2013 at 09:29 PM

    Yes, that would be possible but you would need to embed the source code of the form to accomplish that