Skip to:

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Pewit


    I used PHP MyAdmin to export the table containing the field data – modified it to include the list of countries in excel and then imported it back into the original table checking the option to replace the existing data.

    1. Create a dummy form field to get the format
    Create a profile filed called Country as a dropdown select box.
    Add a few options to the list e.g. Enter Your Country (this will be the default), Afghanistan, Aland Islands
    Save and close the profile form editor
    2. Export the field data to Excel
    Login to PHPMyAdmin (you may need to login to CPanel first if you have a hosted website)
    Go to the database and table containing the form data
    (e.g. wrdp1>wp_bp_xprofile_fields)
    Export the table to Excel CSV format. Check to include the field labels in the header.
    3. Modify the data in Excel.
    Opening the data in Excel will give you a feel for the layout of the data.
    Not the ID number for the options you have entered above.
    Copy and paste you list of countries (search on google for a list in excel or CSV format). Then make the data conform EXACTLY to the sample data you entered – making sure that the record ID numbers start from same ID number as your sample (you can delete the sample countries to avoid duplicates). Also ensure the Parent ID is the same as a field record.
    Save the data as a CSV file
    4. Import into the table
    Go back to the table you exported in 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.
    Now click GO and your data will be imported – Click Browse to check it.
    5. Check your profile form
    Go back to the profile form editor – your new country field should now be populated by the countries you imported.

    This also works for any other dropdown list.

Viewing 1 replies (of 1 total)
Skip to toolbar