Skip to:
Content
Pages
Categories
Search
Top
Bottom

Should Function xprofile_get_field_group Return List of Field IDs?

  • Hi – would really appreciate the forum’s help with this.

    I’m writing a theme for Buddypress that creates custom profile fields on the fly. The fields I create are in a Field Group called ‘Categories’. I hoped I could use the `xprofile_get_field_group()` function to obtain a list of all the fields currently within the ‘Categories’ Field Group, but (even though ‘Categories’ currently contains two fields) the object returned doesn’t seem to list their IDs – even though it looks as if it should.

    For example, when I run this command:

    `print_r(xprofile_get_field_group(2)); //The ID of the ‘Categories’ group is 2`

    The following is returned (note empty ‘fields’ element):

    `BP_XProfile_Group Object
    (
    [id] => 2
    [name] => Categories
    [description] =>
    [can_delete] => 1
    [fields] =>
    )`

    Any ideas? Many thanks!

  • The topic ‘Should Function xprofile_get_field_group Return List of Field IDs?’ is closed to new replies.
Skip to toolbar