Need to customize Country, State, City dependent list in the form.

  • prashant24
    Asked on May 10, 2016 at 8:41 AM

    Hi All,

    I am trying to create a CRM where i can store orders of my customers, wherein i would like to have fileds in the below mentioned hierarchy:

    1.Country(only India required)

    2.State

    3.City

    4.Tehsil

    5.Post Office/Pin

    My problem is the dependent list which i want to create in the above mentioned format will take a lot of efforts to create, reason being in Country India there are 29 States then in the States there are many districts and also may cities which will take lots of time and efforts.

    If possible i would like to get it quickly and with less efforts, any help in regards to my query is much appreiated.

    Thank you,

    Prashant 

  • Carina
    Replied on May 10, 2016 at 10:43 AM

    Jotform has a widget for India's States:

    https://widgets.jotform.com/widget/india_states 

    Alternatively you can copy and paste the cities' list from this resource:

    https://en.wikipedia.org/wiki/List_of_towns_in_India_by_population 

    Let us know if we can assist you further.   

  • prashant24
    Replied on May 11, 2016 at 12:40 AM

    Thank you Carina, but I want to make it a dependent drop down so that if i select one state then I shall get the cities name which falls under that particular state.

    OR rather i can embed the below mentioned code into my form, I found this code after searching a lot on Google.

    The code:

    <select name="country" class="countries" id="countryId">

    <option value="">Select Country</option>

    </select>

    <select name="state" class="states" id="stateId">

    <option value="">Select State</option>

    </select>

    <select name="city" class="cities" id="cityId">

    <option value="">Select City</option>

    </select>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

    <script src="//iamrohit.in/lab/js/location.js"></script>

     

  • Chriistian Jotform Support
    Replied on May 11, 2016 at 1:14 AM

    Unfortunately the code you provided includes javascript, which is not allowed in jotform. You will either have to manually enter all the states and cities in the dropdown field, or use the India States widget as mentioned by my colleague.

    Another alternative would be to download the full source code of your form so you can modify the code and add your own javascript. To get the full source code, simply follow this guide: How To Get The Full Source Code of your Form

    If you need further assistance, please let us know.