I am using dynamic population to return to a field. It works fine, but I would like to return the contents of a post, WITH html formatting (instead of hard coding the output in functions.php).
I was successful in returning the post contents with this:
add_filter('gform_field_value_we_contract_terms', 'we_contract_terms_population');
function we_contract_terms_population($value){
$post_id = 3451;
$queried_post = get_post($post_id);
return $queried_post->post_content;
}
But that returns it with the html markup ( such as ol, li)
Is there a way to return it with the html post formatting intact?
Thanks!