Dynamic Data not showing in when the page is published

I have created a custom meta field for an email I named it get_poster_email
I have a gravity form and want to send an email notification with that custom field, it populates when i am editing the page but when I publish the page it disappears. It can’t send the notification.

This is the code I used.
add_filter( ‘gform_field_value_job_poster_email’, ‘populate_job_poster_email’ );
function populate_job_poster_email( $value ) {
global $post;

// Retrieve the 'job_poster_email' from post meta
$author_email = get_post_meta( $post->ID, 'job_poster_email', true );

return $author_email;

}

Any help in why it’s not populating in the front end or why I can’t send a notification using the post meta?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.