Title: Notification Email Custom HTML Problems
Last modified: November 11, 2024

---

# Notification Email Custom HTML Problems

 *  Resolved [H S](https://wordpress.org/support/users/hsobhy/)
 * (@hsobhy)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/)
 * Hello,
   Because the form entries and layout should look exactly the same as offline
   paper, I use my own HTML code in Notification which contains Tables, DIVs and
   Headings. wpForms changes the HTML and adds TDs and TRs elements instead of just
   insert the entries in their places, How to prevent this and just use the notification
   custom HTML layout the way I do in Contact Form 7?

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

 *  Thread Starter [H S](https://wordpress.org/support/users/hsobhy/)
 * (@hsobhy)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18127343)
 * The plugin also keep inserting breaks tags … 10 tags somewhere and 15 in other
   place and so on especially after <h3> tag.
 * `<br>`
 *  Plugin Support [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * (@rsouzaam)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18131516)
 * Hi [@hsobhy](https://wordpress.org/support/users/hsobhy/),
 * Thanks for reaching out!
 * When you have a chance, could you please share the custom HTML code you’re using
   in the [Email Message](https://wpforms.com/docs/setup-form-notification-wpforms/#email-message)
   field within the notification settings?
 * Alternatively, you could share your form with us. We have a [detailed guide on how to export your form as a JSON file here](https://wpforms.com/docs/how-to-import-and-export-wpforms/).
 * This will allow us to reproduce the issue and provide further guidance.
 * Thanks!
 *  Plugin Support [Shawon Chowdhury](https://wordpress.org/support/users/shawon001/)
 * (@shawon001)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18138345)
 * Hello [@hsobhy](https://wordpress.org/support/users/hsobhy/),
 * We haven’t heard back from you in a few days, so I’m going to go ahead and close
   this thread for now. But if you’d like us to assist further, please feel welcome
   to continue the conversation.
 * Thanks!
 *  Thread Starter [H S](https://wordpress.org/support/users/hsobhy/)
 * (@hsobhy)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18184961)
 * Hello,
 * (This is something you can easily test)
 *  I think there is no need to share my HTML since any valid HTML with DIVs and
   tables (with tr. th, td ) will cause problems … even when I copy any outer HTML
   of a newsletter sent to my Google inbox and show perfect and use in my Notification
   Email it changes to completely wrong tables with borders and extra columns and/
   or rows as explained above
 * I tried different layouts.
 *  Thread Starter [H S](https://wordpress.org/support/users/hsobhy/)
 * (@hsobhy)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18184966)
 * Here is an example: `T[he Code on W3 School Example](https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_intro)`
 * Produce the following view (Screenshot) when send Notification Email to Gmail:
   
   [https://ibb.co/XkNq3zQ](https://ibb.co/XkNq3zQ)
 *  Plugin Support [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * (@rsouzaam)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18190590)
 * Hi [@hsobhy](https://wordpress.org/support/users/hsobhy/),
 * Thanks for the details!
 * When you have a moment, could you please add the code snippet below to your site:
 *     ```wp-block-code
       add_filter(	'wpforms_emails_notifications_message',	static function ( $message ) {		return preg_replace_callback(			'/<table\b[^>]*>(.*?)<\/table>/is',			function ( $matches ) {				return str_replace( "\r\n", '', $matches[0] );			},			$message		);	});
       ```
   
 * In case it helps, here’s our tutorial with the most common [ways to add custom code](https://developers.wpforms.com/docs/how-to-add-custom-php-or-javascript-for-wpforms/)
   like this. For the most beginner-friendly option in that tutorial, I’d recommend
   using the [WPCode plugin](http://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/).
 * After adding the snippet, please test your form again and let me know if it resolves
   the issue.
 * Thanks!

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

The topic ‘Notification Email Custom HTML Problems’ is closed to new replies.

 * ![](https://ps.w.org/wpforms-lite/assets/icon.svg?rev=3254748)
 * [WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More](https://wordpress.org/plugins/wpforms-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforms-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforms-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforms-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforms-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforms-lite/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/notification-email-custom-html-problems/#post-18190590)
 * Status: resolved