Thread Starter
H S
(@hsobhy)
The plugin also keep inserting breaks tags … 10 tags somewhere and 15 in other place and so on especially after <h3> tag.
<br>
Hi @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 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.
This will allow us to reproduce the issue and provide further guidance.
Thanks!
Hello @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
(@hsobhy)
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
(@hsobhy)
Here is an example: The Code on W3 School Example
Produce the following view (Screenshot) when send Notification Email to Gmail:
https://ibb.co/XkNq3zQ
Hi @hsobhy,
Thanks for the details!
When you have a moment, could you please add the code snippet below to your site:
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 like this. For the most beginner-friendly option in that tutorial, I’d recommend using the WPCode plugin.
After adding the snippet, please test your form again and let me know if it resolves the issue.
Thanks!