Ok, I did this the “difficult way” by directly adding into the database. I wish there was a much easier way to handle this ![:( :(](smileys/frown.gif)
Here is the code I used — you need to tweak it for your won requirenents based on how your setup exists:
Code:
INSERT INTO `wp_bp_xprofile_fields` (`id`, `group_id`, `parent_id`, `type`, `name`, `description`, `is_required`, `is_default_option`, `field_order`, `option_order`, `order_by`, `can_delete`) VALUES
(number1, 6, 66, ‘option’, ‘CHOICE1’, ”, 0, 0, 0, 2, ”, 1),
(number2, 6, 66, ‘option’, ‘CHOICE2’, ”, 0, 0, 0, 3, ”, 1);
Hi “parent_id” should be same with the parent id for field name?
I need this xprofile fields import for dropdown menu too, I have many fields to import with big list of options , but this solution above looks like less work by editing it in buddypress one by one –
, does someone knows better and a little bit more painless ?
This is an old thread but I was looking to do the same thing. I had a list of 200 nationalities that I wanted to import.
I used Autohotkey. The script looked somewhat like this:
Loop 200 {
WinActivate Microsoft Excel
send {down}
send ^c
SetTitleMatchMode 2
WinActivate Mozilla Firefox
send {tab}
send {tab}
send {tab}
send {enter}
send ^v
}
You might need to tweak it a little. It took only a few minutes to add all the values.