Buy Now
Sign in

Add breaks in html email on text area

alinden , January 14 2014, 10:19
A
alinden 25
January 14 2014, 10:19 #322154
Hello,

When sending form data through mail, the data from a text area is shown as one block of text. So without any breaks, etc. Is there a way to prevent this? Or is it possible to just send a text email (non-html)?

Kind regards
GreyHead 64
January 14 2014, 10:44 #322157
Hi alinden,

In CFv4 you can set the email to plain text in the action configuration. I'm not sure if this will do what you want though.

You can also replace line-breaks with <br /> tags using a Custom Code action like this:
<?php
$form->data['input_name'] = nl2br($form->data['input_name');
?>

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
A
alinden 25
January 16 2014, 15:35 #322307
Works fine, Thanks!