Hello,
How can I preview a page before saving it and display the AVF values?
At the moment if I click ‘add a new page’, fill in the relevant ACF fields and then click preview none of the values appear :-(.
I need to save a draft first, and then click preview. This is a real pain from a UI perspective and is driving my clients mad.
Any help greatly appreciated.
Thanks
This is an known issue and is due to the way that WP saves values when you click the “preview” link. WP does not submit custom fields when you do this. While the frustration it causes is understandable, There really isn’t any way that has been found to alter this behavior in WP.
There is one work-around posted here that I have not tried https://support.advancedcustomfields.com/forums/topic/preview-solution/
This same problem is reported for all custom field plugins, here’s an example https://wp-types.com/forums/topic/custom-fields-not-displaying-in-post-preview-mode/
Hi John,
Thanks for replying.
I’ve done some further testing and it looks like there’s also an issue when the page is saved as a draft.
Basically hitting preview whilst the page is a draft is borked. I have to hit ‘save draft’ and then preview to see the changes. It is completely unworkable to have to publish a page first as I’m using flexible content fields as a page builder.
I’ve tried the work-around in the post but it dates back to 2013 and doesn’t seem to be working.
Thanks
At this point my suggestion is going to be to submit a new support ticket https://support.advancedcustomfields.com/new-ticket/