This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
[closed] Line Breaks in Email
Started 17 years ago by dustin | 3 posts |
-
When receiving the email notification from the submitted form I noticed that the line breaks (in paragraph fields) do not display. However, looking at the actual data in the database the line breaks appear to be there. Is there a simple way to make these line breaks show in the email?
Posted 17 years ago # -
I believe I have this solved - let me know if this is the best way to go about this:
On line 341 of helper-functions.php you will find:
$email_data[$i]['value'] = "
".htmlspecialchars($value,ENT_QUOTES)."
";Change it to:
$email_data[$i]['value'] = "
".nl2br(htmlspecialchars($value,ENT_QUOTES))."
";Walla! now your emails from forms with texareas/paragraphs will have line breaks!
Posted 17 years ago # -
Yep, you have it correct. Thanks for sharing!
MachForm Founder
Posted 17 years ago #
Topic Closed
This topic has been closed to new replies.