Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Member Registration: country list, possible to modify?

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › Member Registration: country list, possible to modify?

  • This topic has 16 replies, 5 voices, and was last updated 6 years, 7 months ago by amuck1.
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • Author
    Posts
  • July 10, 2014 at 3:10 pm #11158
    jurgenvt
    Member

    Hi, I was wondering if i can modify the list with countries in the registration form?

    i basically need 3 or for and one “other”. i also would like to have one as standard selected.

    thank you!

    July 10, 2014 at 9:40 pm #64243
    wzp
    Moderator

    They are hard coded… 8(

    1. Edit the eMember_misc_functions.php file.
    2. Look for the emember_country_list_dropdown() function.
    3. Edit as applicable.

    July 11, 2014 at 1:27 am #64244
    admin
    Keymaster

    Is it missing any country from the list? If it is we will add them. Which ones are missing?

    We can also add a filter there if it will help. Let me know if you want that.

    July 11, 2014 at 8:59 am #64245
    jurgenvt
    Member

    Hi,

    thank you wzp, i will check it out.


    @admin
    : no i don’t think a country is missing, but 99.999999% of my members will reside in the netherlands, the rest in belgium, germany and other

    so i will not be needing this extensive list.

    July 11, 2014 at 9:06 am #64246
    jurgenvt
    Member

    found this:

    function emember_country_list_dropdown($select = “”) {

    $countries = array(“”, “Afghanistan”, “Albania”, “Algeria”, “Andorra”, “Angola”, “Antigua and Barbuda”, “Argentina”, “Armenia”, “Australia”,

    “Austria”, “Azerbaijan”, “Bahamas”, “Bahrain”, “Bangladesh”, “Barbados”, “Belarus”, “Belgium”, “Belize”, “Benin”, “Bhutan”, “Bolivia”,

    “Bosnia and Herzegovina”, “Botswana”, “Brazil”, “Brunei”, “Bulgaria”, “Burkina Faso”, “Burundi”, “Cambodia”, “Cameroon”, “Canada”, “Cape Verde”,

    “Central African Republic”, “Chad”, “Chile”, “China”, “Colombi”, “Comoros”, “Congo (Brazzaville)”, “Congo”, “Costa Rica”, “Cote d’Ivoire”,

    “Croatia”, “Cuba”, “Cyprus”, “Czech Republic”, “Denmark”, “Djibouti”, “Dominica”, “Dominican Republic”, “East Timor (Timor Timur)”, “Ecuador”,

    “Egypt”, “El Salvador”, “Equatorial Guinea”, “Eritrea”, “Estonia”, “Ethiopia”, “Fiji”, “Finland”, “France”, “Gabon”, “Gambia, The”, “Georgia”,

    “Germany”, “Ghana”, “Greece”, “Grenada”, “Guatemala”, “Guinea”, “Guinea-Bissau”, “Guyana”, “Haiti”, “Honduras”, “Hungary”, “Iceland”, “India”,

    “Indonesia”, “Iran”, “Iraq”, “Ireland”, “Israel”, “Italy”, “Jamaica”, “Japan”, “Jordan”, “Kazakhstan”, “Kenya”, “Kiribati”, “Korea, North”,

    “Korea, South”, “Kuwait”, “Kyrgyzstan”, “Laos”, “Latvia”, “Lebanon”, “Lesotho”, “Liberia”, “Libya”, “Liechtenstein”, “Lithuania”, “Luxembourg”,

    “Macedonia”, “Madagascar”, “Malawi”, “Malaysia”, “Maldives”, “Mali”, “Malta”, “Marshall Islands”, “Mauritania”, “Mauritius”, “Mexico”, “Micronesia”,

    “Moldova”, “Monaco”, “Mongolia”, “Morocco”, “Mozambique”, “Myanmar”, “Namibia”, “Nauru”, “Nepa”, “Netherlands”, “New Zealand”, “Nicaragua”, “Niger”,

    “Nigeria”, “Norway”, “Oman”, “Pakistan”, “Palau”, “Panama”, “Papua New Guinea”, “Paraguay”, “Peru”, “Philippines”, “Poland”, “Portugal”, “Qatar”,

    “Romania”, “Russia”, “Rwanda”, “Saint Kitts and Nevis”, “Saint Lucia”, “Saint Vincent”, “Samoa”, “San Marino”, “Sao Tome and Principe”,

    “Saudi Arabia”, “Senegal”, “Serbia and Montenegro”, “Seychelles”, “Sierra Leone”, “Singapore”, “Slovakia”, “Slovenia”, “Solomon Islands”,

    “Somalia”, “South Africa”, “Spain”, “Sri Lanka”, “Sudan”, “Suriname”, “Swaziland”, “Sweden”, “Switzerland”, “Syria”, “Taiwan”, “Tajikistan”,

    “Tanzania”, “Thailand”, “Togo”, “Tonga”, “Trinidad and Tobago”, “Tunisia”, “Turkey”, “Turkmenistan”, “Tuvalu”, “Uganda”, “Ukraine”,

    “United Arab Emirates”, “United Kingdom”, “United States of America”, “Uruguay”, “Uzbekistan”, “Vanuatu”, “Vatican City”, “Venezuela”,

    “Vietnam”, “Yemen”, “Zambia”, “Zimbabwe”);

    $options = ”;

    foreach ($countries as $country) {

    $selected = (strtolower($country) == strtolower($select)) ? “selected=’selected'” : “”;

    $options .= “<option $selected value='” . $country . “‘ > $country </option>”;

    will it be possible to provide a standard selected country. ?

    thank you

    July 11, 2014 at 1:39 pm #64247
    wzp
    Moderator

    Change:

    array(“”, “Afghanistan”,

    To:

    array(“Standard Default Country”, “Afghanistan”,

    July 11, 2014 at 2:10 pm #64248
    jurgenvt
    Member

    thank you wzp. works! this is great!

    July 11, 2014 at 2:11 pm #64249
    wzp
    Moderator

    8)

    You can also reorder the country list, if you want; in order of political preference.

    September 28, 2015 at 4:27 pm #64250
    wplove
    Spectator

    I need to add “Bermuda” to the country list. I’ll modify the code above if needed. Can I put that in my child theme to protect it from updates? If so, what would be the appropriate file structure?

    Would that edited country list also display for the backend new member creation?

    September 29, 2015 at 12:53 am #64251
    admin
    Keymaster

    If “Bermuda” is a country then we will add it to country list in our plugin. As far as I know, Bermuda is not officially a country. Is my understanding wrong?

    October 31, 2015 at 9:41 am #64252
    wplove
    Spectator

    Good point. It’s not officially a country. That being established, if I modify the code to include it anyway, is there a way to protect that change from future updates?

    October 31, 2015 at 5:36 pm #64253
    wzp
    Moderator

    No. Once you modify any of the files, it becomes your responsibility to keep a backup of your modifications, and to reinstate them after each software update. Normally, once your site enters “production mode” and is running properly, there should be little reason for you to update the software that frequently.

    November 7, 2018 at 4:19 pm #64254
    amuck1
    Member

    I have a different but related question:

    I don’t need the country code for this particular website – all our members will be from the US state of North Carolina, but what I need is to change the Country code to County, and from there list our 100 counties. Can I accomplish this in the same way you described here?

    Thanks,

    ~ Audrey

    November 7, 2018 at 11:49 pm #64255
    admin
    Keymaster

    Hi Audrey, What you suggested is doable. After you change the list in the code, you probably want to use the following technique to change the label of “Country” to “County” for the front-end:

    https://support.tipsandtricks-hq.com/forums/topic/how-to-customize-various-textmessages-displayed-by-the-plugin

    November 8, 2018 at 7:37 pm #64256
    amuck1
    Member

    Hi there, I’ve changed the list and the front end labels – basically found every instance of ‘country’ or ‘countries’ and changed them to ‘county’ and ‘counties’ in the however the dropdown box is not working now. The placeholder box is there, but no dropdown activity. Suggestions? And thanks in advance!

    ~ Audrey

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ