Page 1 of 1

Form Browser strips out text formating

Posted: Thu Oct 22, 2020 11:54 pm
by johnflan
Form Builder has successfully passed the information into Form Browser and I can get this to display nicely on a website page. Apart from the text from a text area as it strips out the paragraphing leaving a solid block of text. When viewed in the the Form Browser admin the text is ok.

In the Form Browser Template I'm using this <p>{$resp->values[6]}</p>

For this field name "Brief Details" is there a way to code it so it leaves the text formatting in?

Many thanks.
Screen Shot 2020-10-23 at 00.37.22.jpg

Re: Form Browser strips out text formating

Posted: Fri Oct 23, 2020 2:43 am
by rotezecke
Check your templates and pages and remove any {strip} blocks. also, if content is stored in variable {$content|strip} will also remove those line breaks.

Re: Form Browser strips out text formating

Posted: Fri Oct 23, 2020 3:25 am
by DIGI3
A textarea will typically save line breaks as newlines, not html line breaks or paragraphs. I don't think it would be FB/FBr changing them. You can use |nl2br to convert them to <br>, see https://www.smarty.net/docs/en/language ... .nl2br.tpl

Re: Form Browser strips out text formating

Posted: Fri Oct 23, 2020 8:19 am
by johnflan
Thanks for both replies. When stuck it's good to have ideas of where else to look. I would never have got there myself and such a tiny bit of code!
<p>{$resp->values[6]|nl2br}</p>

Thank you.