I’m not sure how you associate gravity form entries with event posts but if it is associated with the event post then $entry->post_id should be the post_id for the event. In the following example the form id is 3 and the field id for the location_id is 4 (you would need to change these values to match the form id and field id in your form). The following code snippet should replace the location_id with the location string.
add_filter( 'gform_entries_field_value', 'modify_entry_values', 10, 4 );
function modify_entry_values( $value, $form_id, $field_id, $entry ) {
if ($form_id != 3 || $field_id != 4 || empty( $entry ) || $entry->post_id == 0 || !is_int( $value ) ) {
return $value;
}
$post = get_post( $entry->post_id );
if ( null === $post )
return $value;
$locationId = get_post_meta($post, '_location_id', true);
if ( empty( $locationId ) )
return $value;
$args = array(
'post_type' => 'location',
'meta_query' => array(
'key' => '_location_id',
'value' => $locationId
)
);
$query = new WP_Query($args);
if ($query->have_posts()) {
$query->the_post();
$location = get_post( get_the_ID() );
$address = get_post_meta($location, '_location_address', true);
$town = get_post_meta($location, '_location_town', true);
$state = get_post_meta($location, '_location_state', true);
$postcode = get_post_meta($location, '_location_postcode', true);
$value = $location->post_title . " " . $address . ", " . $town . ", " . $state . " " . $postcode;
}
return $value;
}