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
echo ‘blah, blah, blah’;
when this field is actually empty,
it will still show an error icon of image… instead of nothing…
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() );
when i do some code like this:
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>…
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.
The topic ‘ [Resolved] BuddyPress Xprofile Custom Field Types, : Image.’ is closed to new replies.