Skip to:
Content
Pages
Categories
Search
Top
Bottom

get all values from xprofile data fields


  • lalitavalon
    Participant

    @lalitavalon

    Hello,

    I have xprofile field in my buddypress form. It is a drop down field there are multiple entris in this drop down. In another page we want to make filter so that is why I want to get all the entries in the select box of of xprofile dropdown field. Please help me how we can get the all the fields

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

  • lalitavalon
    Participant

    @lalitavalon

    I used xprofile_get_field_data($field, $user_id, $multi_format); function and used it is working but I read about this function and found user id is the optional but when I did not give user id so it will not display the data.
    So , please help me how cab we get all the values of a dropdown without any user id. I just to get all the values of select box that i feed in to the dropdown from backend


    lalitavalon
    Participant

    @lalitavalon

    Hello, There is an another problem I used the custom post type extended filed plugin and make a drop down of all posts of a custom post type. So i get the filed value xprofile_get_field_data($field, $user_id); by this function.
    But problem is that suppose I have a option value like
    <option value=”1″>One</option>
    So this function gets “One” in output but i want value “1” .

    So how we can get this result please help me i am in trouble and search many of pages but not found any solution please help me.


    shanebp
    Moderator

    @shanebp

    I used xprofile_get_field_data($field, $user_id, $multi_format); function and used it is working but I read about this function and found user id is the optional but when I did not give user id so it will not display the data.

    $user_id is optional if you are looking a the profile page for a member. In that situation, bp_displayed_user_id() is used to provide the $user_id
    Otherwise you have to provide the $user_id.

    Re your second question: you need to ask the creators of the “custom post type extended filed plugin” that you used to create the dropdown.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar