Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Field selectbox bulk import?


  • WPChina
    Participant

    @wordpresschina

    I need to add some dropdown fields in the Profile Field and some of those dropdown fields (selectbox) have over 200 choices. Is there an easy way to take my lists of choices and import them into each Profile Field?

Viewing 4 replies - 1 through 4 (of 4 total)

  • WPChina
    Participant

    @wordpresschina

    Ok, I did this the “difficult way” by directly adding into the database. I wish there was a much easier way to handle this :(

    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?


    4ella
    Participant

    @4ella

    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 ?


    kvdamme
    Participant

    @kvdamme

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Profile Field selectbox bulk import?’ is closed to new replies.
Skip to toolbar