I’ve figured out how to display xprofile field data using the function xprofile_get_field_data(‘Label Name’, $user_id) method but have run into a snag. I have similar field names for multiple groups, e.g. Home Group: Street Address, City, etc. Work Group: Street Address, City, etc.. How do I specify from which group I am querying the fields? Obviously xprofile_get_field_data(‘Street Address’, $user_id) will not work for both groups. I’d like to not use field names “field_245” etc since I am developing a plugin which needs to mine this data the same way every time. E.g., if you delete a field and then re-add it with same label name it will have different auto-generated IDs.
Do I really have to go Ghetto and make every label unique (obvious approach)? If so, what is the point of field groups?
Seems like the whole extended profile scenario in Buddypress is an epic fail since it does not let you specify input_ids for each field and instead relies on this “Use the field text label to retrieve the data” method.
Thanks in advance!