Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8635913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:05:24+00:00 2026-06-12T10:05:24+00:00

I have a page for user registration, but I don’t want the user type

  • 0

I have a page for user registration, but I don’t want the user type the city and the country because he maybe type with errors (something like “mexico d,f” other user can type “Mexico D.F.”) so I was thinking combobox, but I want also all the cities that a country may have, maybe a jquery or some plugin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:05:25+00:00Added an answer on June 12, 2026 at 10:05 am

    First you have to establish the relation between countries and cities. This information will be seed data, and you should choose the solution that suits you best in either keep this information in the DB or in some config file. This will be tricky, cuz countries there are a few hundreds, but cities is almost uncountable. Usually the solution is to make the user choose a country through a select box and let him type the city in which he lives. Maybe then you could query the Google Maps API to check whether that city exists, and use it to validate your form. But if you really want to stick to the combobox solution, you’ll have to access a countries/cities database, and that might be hard to get.

    As soon as you tie this knot, the rest is easy. Populate a select box with the country data and then using javascript update the cities select box (or do nothing if you let your user type it… actually you could mitigate the whole issue by using some sort of autocomplete tool). Once you’re done with this, you’ll just have to validate the data (don’t forget to validate the country/city relation in the server, either by using your seed data or some external tool like Google Maps).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problem in drupal registration page. I want to change whole user
I need something simple; I have page where a user clicks an author to
I have made customized user registration page. and i have made that on theme
I have the User Login Registration Page. Now on the same Page i have
I have created registration page and when user click submit button, an activation link
So I have Yii-user and Yii-bootstrap. I want to load the registration form with
I have a registration form and want to transfer the user to the success
asp c# i have a page where user selects an item and its quantity
I would like to have the page on user/sidebar on the right in the
new on rails and using windows for now,, i have web page that user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.