BuddyPress is used to build your own social media platform in WordPress. By default buddyPress allows admin to add various profile fields to the registration form, such as radio buttons, select dropdown , checkboxes etc. But what if you need to add the country drop down to your profile field?
BuddyPress does not give the country drop down. So probably you have to add all countries manually. There are more than 200 countries. So adding these countries manually its just too much time consuming. So other option would be customizing the buddPress ? Doing this is also time consuming.
If you need a quick solution of adding country drop down in your registration form. Then please follow steps mentioned below. You can add the drop down in your database directly.
1) Create a profile filed called Country as a dropdown select box. (add two or three options to select dropdown like Afghanistan, Australia, Belgium etc)
Save and close the profile form editor.
2) Login to your PHPMyAdmin. Go to the database and table containing the form data which is (table name is)
Export the table to Excel CSV format. Check to include the field labels in the header.
3) Open this CSV – Copy and paste your list of countries (search on google for a list on countries in excel or CSV format). Then make the data conform EXACTLY to the sample data you entered (ensure the Parent ID is the same as a field record)
Save the CSV.
4) Import this CSV into table.
Go to phpmyadmin. Import the CSV file you just modified. Check to replace the table contents. Ignore the first line of data if you have kept the field labels at the top of your file. Check that the record delimiter is a comma. Import your data.
5) Check your profile form. It should have the list of all countries in drop down.
These should solve your problem. This trick worked for me in first try.