getPreviewPost( $postId ); $postId = $previewPost->ID; } $this->render( $block, $content, $postId ); } protected function render( $block, $content, $postId ) { $formKey = get_field( 'form_key' ); if( !$formKey ) { print "Set form key to see form."; return; } acf_form( $formKey ); } }