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.

General Questions /

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

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

Missing nl2br() for readonly TextareaField


Reply


5 Posts   223 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, 1798 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, 1798 Posts

13 May 2014 at 3:32am

Edited: 13/05/2014 3:38am

https://github.com/silverstripe/silverstripe-framework/issues

Hit the "New Issue" button. Please review...

http://doc.silverstripe.org/framework/en/trunk/misc/contributing/code

Avatar
m-phil

Community Member, 37 Posts

13 May 2014 at 4:56am

ok thx swaiba
https://github.com/silverstripe/silverstripe-framework/issues/3128