@graq I had to do the same for a drop down field. First I created a dropdown with let say 5 options (so you will know where to enter the other values later on). I downloaded the table from my database and added the other values through excel. Once done, I uploaded the file again in my database. Worked for me.
@ultimateuser Do you mean write values directly into bp_xprofile_fields ?
I wrote some dirty SQL to do just that.
` $insertsql = $wpdb->prepare(“INSERT INTO {$tablename} (group_id, parent_id, type, name, description, is_required, order_by, field_order, is_default_option, option_order ) VALUES (%d, %d, %s, %s, %s, %d, %s, %d, %d, %d )”, $group_id, $parent_id, $type, $region, ”, 0, ”, 0, 0, $option_order );`
To be honest, I was hoping there would be a better way.
@graq Yes into bp_xprofile_fields.
It has indeed worked a treat. Seems very possible for someone to extend this into a csv-style upload (as there once was, by the looks of my searching).
I am vaguely interested in how ‘uploading a spreadsheet into a database’ works 