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
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.
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.