Description

The wpforms_email_display_other_fields filters non-input field types to include in {all_fields} output.

Parameters

$fields
(array) (Required) Non-input field types to include.

Source

wpforms/includes/emails/class-emails.php

More Information

The filter determines whether non-input fields are included in the form’s notification email when the {all_fields}Smart Tag is used.

It can be used to include Page Break (page title), Section Divider, and/or HTML fields in form emails.

Example

/**
 * Filters non-input field types to include in {all_fields} output.
 *
 * @link   https://wpforms.com/developers/wpforms_email_display_other_fields/
 *
 * @param  array $fields Non-input field types to include.
 * @return array
 */

function wpf_dev_email_display_other_fields( $fields ) {

	return array( 'divider', 'pagebreak' );
}

add_filter( 'wpforms_email_display_other_fields', 'wpf_dev_email_display_other_fields', 10, 1 );

Article Reference: Include Page Break, Section Divider, and HTML fields in notifications