Skip Navigation

[Resolved] How to add all countries in the world as multi-selectable options

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.

This topic contains 15 replies, has 4 voices.

Last updated by benjaminY 7 years, 1 month ago.

Assigned support staff: Luo Yang.

Author
Posts
#240022

I want to include to include two sets of countries in the post configuration of my posts such that people can search for content by country or citizenship. How do I do this with or without using categories as the organizing framework?

#240023
iStudent Page.png

See sample page below

#240052

Hi Mathew,

I can't help you with your question, however, I saw you were wanting to make a countries list. I spent a ton of time putting one together in a types select field -- There's something like 248 countries. To help you out and so you don't have to reinvent the wheel, I'd be happy you send you a module for your use.

I also have the US and Canada in the same format if you want it.

Here's a couple of images of how I have it set up.

#240053
country.custom.field.group.png
country.cpt.png

I forgot the images

#240095

Thank you! That's very kind of you. Please kindly share. Do you need my email address? I am not sure this system allows private communication

#240182

Hi Matthew,

I uploaded the file to my server. hidden link

Becky

#240189

United States and Canada are not in the country list. I didn't need them so they're not included. Hope this helps with your project. Good Luck!

#240195

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi matthewA-3,

Does Becky's solution works for you? Please let me know if you need more assistance,
@Becky, thanks for share it, hope it helps other users.

#240236

Hi Becky,

Thanks very much! I just downloaded the zip file. I really appreciate your kindness.

Luoy: I think the bigger problem for me is how to make them multi-selectable (being able to select multiple countries at once) when posting content. Any help with that would be highly appreciated.

Thank you,
Matthew

#240407
Screen select.png

Maybe this is a better representation of what I am looking for. A multi-select option instead of the single select currently available.

Waiting for a quick response

#240463

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

There isn't multi-select option in Types, I suggest you try the checkboxes field

#241273

The problem then is is using it as a selectable search filter field in View. Normally, it displays as checkboxes on the frontend as well. But I want something similar to the box in the first picture above. If I can't achieve that, this would almost be useless to me. I want users to search by countries but fron the backend, I need need to be able to associate the same scholarship with many eligible countries.

#241308

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Sorry it is not possible within Types, I suggest you try Check out our certified partners:
https://toolset.com/consultant/

#246232

Resolved

#246250

I originally used a Single line field, but after I saw this, I might change to this.

Thanks a bunch Becky.