How to Show Empty Form Fields in Email Notifications

Overview

Would you like to show empty form fields inside your email notifications? By default, WPForms doesn’t include empty fields in the notifications but this can be easily changed with a small code snippet added to your site. In this tutorial, we’ll show you how to use PHP to include any empty form fields inside your email notifications.

Setup

To begin, copy the code below and add it to your site.

/**
 * Show empty form fields in email notifications.
 *
 * @link https://wpforms.com/developers/how-to-show-empty-form-fields-in-email-notifications/
 * 
 */
add_filter( 'wpforms_email_display_empty_fields', '__return_true' );

Once the code has been added, you’ll now see all form fields inside your email notifications, including the empty ones.

With the PHP snippet, you'll now show empty fields in your email notifications

And that’s it! You’ve now completed the steps needed to include empty form fields in your email notifications. Would you like to hide the image choices in your email notifications as well? Take a look at our tutorial on How to Hide Image Choices in Notification Emails.