Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can a plugin create custom profile fields?

  • @butimnoexpert

    Member

    I’m working on a plugin that pulls data from some custom profile fields, but it requires the fields be named a specific way. Rather than depending on the site admin to name the fields correctly, is it possible to have the plugin create the custom profile fields? What hook would I use and does anyone have any working code for doing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @djpaul

    Keymaster

    Take a look at xprofile_insert_field() in xprofile.php

    @butimnoexpert

    Member

    Thanks Paul! I took a break to finish the other parts of the plugins and the rest of that project, but now I’m back working on this part again. Unfortunately, I can’t make head or tails of that function. I’ve tried sending a variable array to that function based on the parameters it gives on line 584, but it never adds the field. It appears xprofile_insert_field() requires a the group_field_id too, which I’m also trying to create a new Field Group, but I can’t find a way to get the ID # of the group I’m creating, and it doesn’t appear the group is created either. Is there a tutorial or a working plugin that does the same thing I can see HOW they did it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can a plugin create custom profile fields?’ is closed to new replies.
Skip to toolbar