acf_form() Not Showing in Admin Preview

Published on 16 November 2016 by John Carter

It turns out that if you are using the Advanced Custom Field function   acf_form()  to display a front end form on your site, if you preview the post from admin it does’t show.

This is due to the post_id not being set in preview. You can easily get the front end form to show in preview by defining the post_id in the options array, as so: