The message is saved into the database without the new lines.

Preserve line breaks when displaying text from a database.

Overview

The text is stored without HTML line break tags, causing it to appear on a single line.
Use the nl2br function on the retrieved text before displaying it to convert newlines to HTML line breaks.

Answered
ChronoForms v6
mi michelj 07 May, 2020
Hi,
​
I'm retrieving the messages stored into the database.
But the text is on one line, without the new lines.
​
When sent by email, the formatting is correct.
​
Any idea?
​
Thanks a lot!
Michel
Max_admin Max_admin 08 May, 2020
Yes, the data coming from the field does not have <br> formatting nodes, they are added in the email for better display!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mi michelj 08 May, 2020
Hi Max,

Thanks for your answer.

Could you give me a tip on how to include it before it is saved into the database?
​
Thanks,
Michel
Max_admin Max_admin 08 May, 2020
that's wrong, keep it as its and use the function nl2br before you display it!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mi michelj 08 May, 2020
Thanks!
It should work fine.
I'll notice.
This topic is locked and no more replies can be posted.