Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Missing nl2br() for readonly TextareaField


Go to End


5 Posts   1375 Views

Avatar
m-phil

Community Member, 37 Posts

12 May 2014 at 11:03pm

If you use a TextareaField object and make it readonly with $fields->makeReadonly() the content (saved priviously in a writable form) shows it without any breaks. It should call nl2br() before printing.

Avatar
swaiba

Forum Moderator, 1899 Posts

13 May 2014 at 12:47am

Hi m-phil,

I'm sure this is the kinda thing that silverstripe would great appreciate as a pull request :)

Avatar
m-phil

Community Member, 37 Posts

13 May 2014 at 3:05am

ok, great give me the link ;-)

Avatar
swaiba

Forum Moderator, 1899 Posts

13 May 2014 at 3:32am

Edited: 13/05/2014 3:38am

Avatar
m-phil

Community Member, 37 Posts

13 May 2014 at 4:56am