Skip Navigation

[Resolved] City field with suggestions

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2320037

Tell us what you are trying to do?

Hi, i would like to create a dropdown on my form that lists all cities in france and belgium, so that the user can choose on that list instead of writing it
because when they write and you have 2 users from the same city, it appears twice in the search form

My website is beautyforum.be

#2320287

Hello,

You can setup the city as a custom field or custom taxonomy, and there is some differences.
If you want to order the result by city, you can try with custom field, if you don't need order the result by city, then you can setup it as custom taxonomy.

So you can setup the options in city manually, and your user won't need to input them again.

More help:
Creating Custom Fields in WordPress
https://toolset.com/course-lesson/creating-custom-fields/
Creating a Custom Taxonomy in WordPress
https://toolset.com/course-lesson/creating-a-custom-taxonomy/

#2320379

Does that means i would have to create a taxonomy for each city ? knowing that there is more than 30k cities in France only 🙁

#2320389

No, you don't need to create a taxonomy for each city.

The post form for creating new post, you can also allow user to create new term in taxonomy "city", just like when you create post, and add term into taxonomy category.