### [How to Include Non-Input Fields in Notifications](https://wpforms.com/developers/include-page-break-section-divider-and-html-fields-in-notifications/)

**Published:** October 14, 2019
**Author:** Editorial Team

**Excerpt:** This tutorial will teach you how to include non-input fields such as the Section Divider, Page Breaks, HTML, and even the new Content field inside your email notifications. 

**Content:**

Would you like to include non-input fields in your notifications? To keep the flow of the notification email matching your form you may want to include things like the **Page Break**, **Section Dividers**, **HTML**, and **Content** fields. Using PHP we’ll show you how you can include these fields in your email notifications.

[Automatic notification emails](https://wpforms.com/docs/setup-form-notification-wpforms/ "How to Set Up Form Notification Emails in WPForms") for WPForms will, by default, include the `{all_fields}` [Smart Tag](https://wpforms.com/docs/how-to-use-smart-tags-in-wpforms/ "How to Use Smart Tags in WPForms"). This will display all input fields (field labels and selections/input) that a user filled out within an HTML email template.

![the all fields smart tag will automatically include all form fields except HTML, Page Breaks, Section Dividers and empty fields](https://wpforms.com/wp-content/uploads/2019/10/wpforms-all-fields-email-notifications.jpg)

Please note that if you’re using the **Plain Text Email Template**, this snippet will not work for you. To check which Email Template you have selected, navigate to **WPForms » Settings » Email**.

## Creating your form

First, you’ll need to create your form and add your fields to the form. If you need assistance in creating your form, [please review this documentation](https://wpforms.com/docs/creating-first-form/ "How to Create Your First Form").

![create your form and add your section divider, page break and HTML form fields](https://wpforms.com/wp-content/uploads/2019/10/wpforms-create-form-.jpg)

## Adding the snippet to your site

We’ve included two examples, depending on which fields you need to include. You’ll need to find the snippet that works best for your needs and add the snippet to your site.

If you need help in adding snippets to your site, [please see this tutorial.](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms")

Also, [be sure to test your notification emails](https://wpforms.com/docs/how-to-properly-test-your-wordpress-forms-before-launching-checklist/#email-delivery "How to Properly Test Your WordPress Forms Before Launching [Checklist]
") after adding this code.

#### Page Breaks and Section Dividers only

This code shown below will only include the **Page Breaks** and **Section Dividers** in your email notifications.

```

/**
 * Filters non-input field types to include in {all_fields} output.
 *
 * @link   https://wpforms.com/developers/include-page-break-section-divider-and-html-fields-in-notifications/
 */

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 );
```

#### All non-input fields

Alternatively, you can use this code to show **all** non-input fields such as **Page Breaks**, **Section Dividers**, **HTML**, and **Content** fields.

```

/**
 * Filters non-input field types to include in {all_fields} output.
 *
 * @link   https://wpforms.com/developers/include-page-break-section-divider-and-html-fields-in-notifications/
 */

function wpf_dev_email_display_other_fields( $fields ) {

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

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

And that’s it! Your **Page Breaks**, **Section Dividers**, **HTML**, and **Content** form fields will now be included in your notification emails. Would you like to include empty fields inside your email notifications as well? Check out our guide on [How to Show Empty Form Fields in Email Notifications](https://wpforms.com/developers/how-to-show-empty-form-fields-in-email-notifications/ "How to Show Empty Form Fields in Email Notifications").

## Reference Filter

[wpforms\_email\_display\_other\_fields](https://wpforms.com/developers/wpforms_email_display_other_fields/ "Using the wpforms_email_display_other_fields filter")

## FAQ

#### Q: Why isn’t my HTML field showing?

**A:** When using this snippet, your **Page Breaks**, **Section Dividers** and **HTML** fields will **only** show if you use the `{all_fields}` Smart Tag. If you try and pull in these particular fields on their own by calling the field ID inside the email notification, they will not display.

Also, make sure that you have set the **Email Template** option in the **Settings** of WPForms is **not** set to **Plain Text** as mentioned above.

**Categories:** Notifications

**Tags:** PHP

---

