Page 1 of 1

Maintain line breaks when sending email as HTML in FormBuilder

Posted: Fri Oct 23, 2009 11:25 am
by tomgsd
Just a very quick one here:

If someone fills out a form and adds line breaks, by default these are shown as a single line in the email and on the results page.

Solve this by adding "|nl2br:true" as a modifier on your smarty message variable in both the submission and email template.

Eg, {$message|nl2br:true}

The new lines get converted to
's and you see the intended formatting.