Create a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\profile-loop.php
Look at bp_the_profile_field_name() and bp_the_profile_field_value() – they display the value.
You’ll need to write a conditional using
bp_get_the_profile_field_name and bp_get_the_profile_field_value() so that you can use the values without displaying them.
For example:
if( bp_get_the_profile_field_name() == 'current_weight' )
$current_weight = bp_get_the_profile_field_value();
if( bp_get_the_profile_field_name() == 'starting_weight' )
$starting_weight = bp_get_the_profile_field_value();
$weight_lost = $starting_weight - $current_weight;
echo '<br/>weight lost so far: ' . $weight_lost;
@shanebp Thank you so very much for the examples. I wish I knew more of what I was doing to implement it. Was kind of hoping their could have been some way to calculate this on the profile page through a simple additional field-such as a display only field. I wish I was smart like you and this would be a no brainer and it would be done already….
Will