Skip to:
Content
Pages
Categories
Search
Top
Bottom

X Profile Field Drop Downs do not work (not selected) in Edit Profile page.

  • @graq

    Participant

    I have some drop down fields. When a user goes to edit them, the data is saved correctly. However, when they revisit the edit profile tab, none of the drop downs show as selected. Is this a bug? Or have I broken something?

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

    Keymaster

    It was once. Are you running an old version of BuddyPress?

    @graq

    Participant

    Running WP 3.1 BP 1.2.8
    Have installed a search plugin where the drop downs are working.

    @graq

    Participant

    Looking through the code it appears to be the bp-profile-search plugin that causes a conflict.

    profile/edit.php – `$html .= apply_filters( ‘bp_get_the_profile_field_options_select’, ‘name ) ) . ‘”>’ . stripslashes( esc_attr( $options[$k]->name ) ) . ”, $options[$k] );`

    bps-functions.php
    `
    add_filter (‘bp_get_the_profile_field_options_select’, ‘bps_field_options’, 99, 2);
    ….
    case ‘selectbox’:
    if ($option->name == $_POST[“field_$field->id”])
    $selected = ‘ selected=”selected”‘;
    else
    $selected = ”;

    $html = ‘name). ‘”>’.
    esc_attr ($option->name). ”;
    break;

    `

    Because no search parameters exist, the profile edit screen doesn’t show the selected drop down values.

    @graq

    Participant

    Just for now, I have edited bp-profile-search bps_field_options filter function, adding:
    `if( is_user_logged_in() )
    if( bp_is_home() )
    return $html;`

    @graq

    Participant

    This does mean, however, that (as the search is in a side bar widget), those values a preselected in the search on the profile page.

    @dontdream

    Participant

    Hello GRAQ,

    Thank you for your feedback, I’ll look for a way to remove that conflict in BP Profile Search.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘X Profile Field Drop Downs do not work (not selected) in Edit Profile page.’ is closed to new replies.
Skip to toolbar