Hi,
Please provide the steps to produce the error.Thank you
Brajeshfor example:
if i have profile field (id: 99) , used image type:
$image = xprofile_get_field_data(99, bp_displayed_user_id());
i want to show this at some other place, use some codes like
if($image){
echo ‘blah, blah, blah’;
echo $image;
}when this field is actually empty,
it will still show an error icon of image… instead of nothing…or,
i tried…
if(!empty($image)){
do something here…
}but when the field is actually empty, still showing “do something here…” instead of nothing….
.; (
: )
it’s same to the phone profile field,
for example, i have profile field signed to phone type.
$phone = xprofile_get_field_data(66, bp_displayed_user_id() );
then,
when i do some code like this:
if($phone){
echo ‘<i class=”icon-phone”></i>’ . $phone ;
}
on the front, when phone field is actually empty, it will still show <i class=”icon-phone”></i>.
when it’s not empty, it will show $phone ahead of <i class=”icon-phone”></i>…weird, right.
If i changed field type to just text field, it shows normal.
when it’s empty, nothing showing, when it’s not empty, show content normally by order.
Hi,
I will test it today/tomorrow and get back to you.Regards
BrajeshHi,
One of our team members teated it and we did not find any issue.You will need to use the actual user id as second parameter. Display user id is only available on user profiles.
Regards
Brajesh
The topic ‘ [Resolved] BuddyPress Xprofile Custom Field Types, : Image.’ is closed to new replies.