i'm trying to pass from my custom post type, the value of a trip to the form to collect a trip deposit. i'll eventually be calculating 20% of the trip rate, but it's not passing this data through. guidance appreciated.
add_filter('gform_field_value_trip_deposit', 'populate_post_trip_deposit');
function populate_post_trip_deposit($value){
global $post;
$trip_rate_value = get_post_meta($post->ID, 'trip_rate');
return $trip_rate_value;
}