Form Browser strips out text formating Topic is solved

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
johnflan
Forum Members
Forum Members
Posts: 28
Joined: Thu Aug 23, 2007 5:20 pm

Form Browser strips out text formating

Post 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
User avatar
rotezecke
Power Poster
Power Poster
Posts: 372
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Form Browser strips out text formating

Post 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.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1076
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Form Browser strips out text formating

Post 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
Not getting the answer you need? CMSMS support options
johnflan
Forum Members
Forum Members
Posts: 28
Joined: Thu Aug 23, 2007 5:20 pm

Re: Form Browser strips out text formating

Post 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.
Post Reply

Return to “Modules/Add-Ons”