Skip to Content Skip to Menu

Translate Zip Code to City field

  • userbk
  • userbk
  • OFFLINE
  • Posts: 75
  • Thanks: 1
  • Karma: 1
12 years 10 months ago #167738 by userbk
Translate Zip Code to City field was created by userbk
I was wondering whether at the time of registration and only then, as I'm having new subscribers provide their Zip Code, I could have some script translate the zipcode they write through a database that I can install, into a city name and have that name show up in the city field?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 68605
  • Thanks: 9108
  • Karma: 1434
12 years 10 months ago #167778 by krileon
Replied by krileon on topic Re: Translate Zip Code to City field
If you already have a database established where you can translate the zip to city then yes. You could do this using CB Queries, which allows executing database queries at various CB triggers such as after registration. If something more complex was needed you could use CB Code to execute a PHP file that handles all the queries, connections, etc.. in that could could probably even use Google Maps API using CURL requests. Then perform a database query to insert the city into the users CB table row.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn