Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'hide xprofile fields'

Viewing 5 results - 101 through 105 (of 105 total)
  • Author
    Search Results
  • #51270
    peterverkooijen
    Participant

    Temporary solution how to customize registration form until 1.1 arrives, FYI and my own reference:

    Changed this line in function bp_show_register_page() in functions.php in my template:

    require ( BP_PLUGIN_DIR . '/bp-core/bp-core-signup.php' );

    to

    require ( 'custom-signup.php' );

    Copied bp-core-signup.php to the template folder, renamed to custom-signup.php.

    Go customize! :-)

    Unfortunately the custom fields are generated by yet another core function:

    do_action( 'signup_extra_fields', $errors );

    This action is associated with the function xprofile_add_signup_fields in bp-xprofile/bp-xprofile-signup.php.

    Copied the function to bp-custom.php, renamed action and function to custom_signup_extra_fields and custom_xprofile_add_signup_fields.

    Used this CSS trick to hide the avatar upload. Will use the same trick to hide the username field.

    #50787
    Paul Wong-Gibbs
    Keymaster

    See https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions, “How to hide selected profile fields” and “How to show secondary profile fields while hiding the “Base” profile fields in a user profile”.

    These should get you started and this has been discussed elsewhere on the forums, so do a search.

    #40349
    bingoneighbour
    Participant

    Actually it’s pretty easy to see what profile fields are called in the DB – Check the wp_bp_xprofile_fields table and you’ll have an ID associated with each field which you should be able to use to call them.

    #40347
    enlightenmental1
    Participant

    it appears the profile fields are being named rather generically…

    i.e.

    field_1

    (first name)

    field_2

    (xprofile field #1)

    field_3

    (xprofile field #2)

    I need a way to manually call/insert these values… and Im assuming they aren’t named “field_3” in the database

    I was hoping if i add an extra field and call it “Referred by” that the DB table name would be “referred_by”

    this this a correct presumption?

    I have little knowledge of functions and this code has ALOT of them….

    #40283
    Burt Adsit
    Participant

    You’ll have to modify the member theme functions that display the fields in the profile. That gets generated in: /buddypress-member/profile/profile-loop.php

    by the function: bp_the_profile_field_value() in /mu-plugins/bp-xprofile/bp-xprofile-templatetags.php

    There’s a filter in there that you can hook: echo apply_filters( ‘bp_the_profile_field_value’, $field->data->value, $field->type, $field->id );

    So that you can detect these specific fields and change what gets generated by bp.

Viewing 5 results - 101 through 105 (of 105 total)
Skip to toolbar