Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I auto-populate a profile field in Buddypress?


  • jfcarter
    Participant

    @jfcarter

    I’d like to pre-populate some BuddyPress profile fields with certain information.

    Where would I go to add the information/code that I want to appear in a specific profile field?

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

  • jivany
    Participant

    @jivany

    At what point? On registration? Any field you tag as required will need to be filled out by the user when they register.


    jivany
    Participant

    @jivany

    At what point? On registration? Any field you tag as required will need to be filled out by the user when they register.


    stwc
    Participant

    @stwc

    If it’s on registration, work with a child theme as described in this thread: https://buddypress.org/forums/topic/adding-some-text-to-the-signup-form

    Then just prepopulate the fields (assuming it’s static info for all registrants) using standard forms HTML stuff.

    If it’s dynamic info, well, same first step, but after that, I’m out of my depth! ;-)


    stwc
    Participant

    @stwc

    If it’s on registration, work with a child theme as described in this thread: https://buddypress.org/forums/topic/adding-some-text-to-the-signup-form

    Then just prepopulate the fields (assuming it’s static info for all registrants) using standard forms HTML stuff.

    If it’s dynamic info, well, same first step, but after that, I’m out of my depth! ;-)


    jfcarter
    Participant

    @jfcarter

    After registration. These are not required fields.


    jivany
    Participant

    @jivany

    Well, you should be able to create pretty much everything you need in your theme’s functions.php file.

    First you need to decide at what point you want to populate the fields. Find a hook in the code to attach to by looking for do_action(‘some_action_hook_name’) calls. In your functions.php file, make a new function and call something like:

    add_action('some_action_hook_name','my_nifty_auto_pop_function');

    Then create your nifty_auto_pop_function that fills in the xprofile fields you want to populate.

    Look in the bp-xprofile directory for all of the different files/functions to help fill in and read profile fields.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I auto-populate a profile field in Buddypress?’ is closed to new replies.
Skip to toolbar