Hi,
I want to provide a preview for my custom block and I have realised the front ed forms do not render in the wp admin area. Is there a way to preview the forms in the block editor at all? at the moment by block is just blak as there is nothing to display.
setup
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
$meta_boxes[] = [
'title' => 'Product Filtering Block',
'id' => 'dc-product-filtering-block',
'description' => 'Product filtering form',
'type' => 'block',
'icon' => 'screenoptions',
'category' => 'dc-blocks',
'context' => 'side',
'render_template' => __DIR__ . '/template/dc-product-filtering-block-template.php',
...
Inside 'dc-product-filtering-block-template.php' i want to call the following shortcode
echo $search_title;
echo do_shortcode('[mb_frontend_form id="dc-product-filtering" post_type="products" confirmation="Updated" submit_button="Update" ajax="true"]');
The preview of the block does not display the form but it obviously works on the front end when previewing the page.
Thanks
Nick