Hello,
So, something I am having a difficult time with right now is trying to populate some fields with data from a post object selection. I am putting together a proposal system, and need the ability to store “canned” responses for items but have the ability to edit them to be more custom for certain scenarios.
Scenario: I have 4 custom post types.
Setup: 1 of my custom post types uses a flexible content field, within this field I have a ACF Gravity Forms field, Post Object field (pulling in posts from another custom post type), a WYSIWYG field and finally a text field.
Issue: After choosing a post from the Post Object field, I need to populate my blank WYSIWYG field with the content from that post.
After some digging online someone pointed me to this WP function:
add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
$content = 'DEFAULT CONTENT HERE.';
return $content;
}
Which works for my default WP editor, but I am unsure if I can use this function to translate to my ACF field pulling in the data from the post object.
I found this link: http://www.advancedcustomfields.com/resources/filters/acf-fields-post_object-result/ but again, not certain if that applies to what I am trying to achieve here.
Any help would be greatly appreciated. Been tackling this issue on and off for a while now with no luck. Attached is a screen grab of the fields.