Title: render_block filter makes email empty
Last modified: May 31, 2019

---

# render_block filter makes email empty

 *  Resolved [Bastian Fießinger](https://wordpress.org/support/users/bastianfiessinger/)
 * (@bastianfiessinger)
 * [7 years ago](https://wordpress.org/support/topic/render_block-filter-makes-email-empty/)
 * If I use the `render_block` filter to manipulate the gutenberg block output and
   just write a single line before returning the block’s content my confirmation
   email will be empty.
    It has its defined recipient, From and To Parameters, but
   the content is completely empty.
 * Even if I use something like:
 *     ```
         if ( has_shortcode( $block_content, 'advanced_form' ) ) {
           return $block_content;
         }
       ```
   
 * if I just write `return $block_content;` without any previous line it’s working…

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [fabianlindfors](https://wordpress.org/support/users/fabianlindfors/)
 * (@fabianlindfors)
 * [7 years ago](https://wordpress.org/support/topic/render_block-filter-makes-email-empty/#post-11601291)
 * That’s weird!
 * I don’t have to much experience using Gutenberg in combination with Advanced 
   Forms. Do you have a site I could access to look closer into this?
 *  Thread Starter [Bastian Fießinger](https://wordpress.org/support/users/bastianfiessinger/)
 * (@bastianfiessinger)
 * [7 years ago](https://wordpress.org/support/topic/render_block-filter-makes-email-empty/#post-11602455)
 * Of course. I can give you a view to the page in Dev. Do you have an email where
   I can address you? I don’t want to make the link public.
 * Thanks in advance.
 *  Thread Starter [Bastian Fießinger](https://wordpress.org/support/users/bastianfiessinger/)
 * (@bastianfiessinger)
 * [7 years ago](https://wordpress.org/support/topic/render_block-filter-makes-email-empty/#post-11604149)
 * For anyone facing the same issue:
 *     ```
       function THEME_render_block_AF_SendEmailContent( $content, $email, $form, $fields ) {
   
       	if ( $content == '' )
       		$content = $email['content'];
       	else
       		$content = $content;
   
         return $content;
       }
       add_filter( 'af/form/email/content', 'THEME_render_block_AF_SendEmailContent', 10, 4 );
       ```
   
 * the content variable will somehow be empty when the shortcode content has been
   manipulated through `render_block` but `$email['content']` does still store the
   values.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘render_block filter makes email empty’ is closed to new replies.

 * ![](https://ps.w.org/advanced-forms/assets/icon-256x256.png?rev=1894254)
 * [Advanced Forms for ACF](https://wordpress.org/plugins/advanced-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-forms/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bastian Fießinger](https://wordpress.org/support/users/bastianfiessinger/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/render_block-filter-makes-email-empty/#post-11604149)
 * Status: resolved