Add all cities list as a dropdown

Hi,

There is a city field in the address contacts. I need to make that a dropdown field and add all the cities in the world like how the country field is auto populated with all the countries present.

How can this be achieved?



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Hi Aditya,

1. You have to change the "City" field to 'Select' type.
2. Use 'add_options' property on city field on client side, refer https://github.com/webnotes/erpnext/blob/master/setup/page/setup_wizard/setup_wizard.js


On Tue, Oct 29, 2013 at 5:53 PM, Aditya Kumar <to...@gmail.com> wrote:
Hi,

There is a city field in the address contacts. I need to make that a dropdown field and add all the cities in the world like how the country field is auto populated with all the countries present.

How can this be achieved?



Note:



If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
Regards,
Akhilesh Darjee



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
I have changed it to select type , add_options - using this where do I store all the city data ? I believe you must be pulling all the country data from google's DB of country's?

Is something possible for cities around the world? Or do I have to enter all the cities manually in some file and keep it and then call it via the add_options?



On Wednesday, October 30, 2013 1:09:08 PM UTC+5:30, Akhilesh Darjee wrote:
Hi Aditya,

1. You have to change the "City" field to 'Select' type.
2. Use 'add_options' property on city field on client side, refer https://github.com/webnotes/erpnext/blob/master/setup/page/setup_wizard/setup_wizard.js 


On Tue, Oct 29, 2013 at 5:53 PM, Aditya Kumar <to...@gmail.com> wrote:
Hi,

There is a city field in the address contacts. I need to make that a dropdown field and add all the cities in the world like how the country field is auto populated with all the countries present.

How can this be achieved?



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
Regards,
Akhilesh Darjee



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.