Description

A filter used to hide any empty form field inside email notifications.

Parameters

$display
(bool) (Required) Determines if empty fields should be displayed in email notifications, default is false (to hide)

Source

wpforms/includes/emails/class-emails.php

More Information

The wpforms_email_display_empty_fields filter can be used to show all fields in form notifications. By default, any empty form field will not be included in these notifications.

Example

/**
 * Show empty form fields in email notifications.
 *
 * @link https://wpforms.com/developers/wpforms_email_display_empty_fields
 * 
 * @param  bool $display   Default is false.
 *
 * @return bool
 */
add_filter( 'wpforms_email_display_empty_fields', '__return_true' );

Snippet Reference: How to Show Empty Form Fields in Email Notifications