Skip to:
Content
Pages
Categories
Search
Top
Bottom

insert data in xprofile field


  • MilliR
    Participant

    @millir

    How do I insert data into the xprofile fields?

    Say during registration, I have a dropdown profile field called “game” that should be entered by the user. field values (battlefield , starcraft , dota)

    I have 1 more fields , say “type” which has the following selectable values =”moba, fps, strategy”

    After he submits the form, I want to automatically insert a value from the selectable “type” field into the database.

    i.e, if user inputs “battlefield”, I want to automatically in the backend select the “fps” value in the “type” field and save it in the database.

    How do I do this???

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

  • shanebp
    Moderator

    @shanebp

    Use this hook and write a function in bp-custom.php
    do_action_ref_array( 'xprofile_data_after_save', array( &$this ) );

    See the hook at ~Line 811 in bp-xprofile/bp-xprofile-classes.php


    MilliR
    Participant

    @millir

    I am clueless how to use this 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘insert data in xprofile field’ is closed to new replies.
Skip to toolbar