AnsweredAssumed Answered

How do I insert a carriage return into a textarea field via a logic hook?

Question asked by dine@psdglobal.com dine@psdglobal.com on Mar 15, 2014
Latest reply on Nov 16, 2014 by Jason Eggers
I am attempting to update the description in the account record via a logic hook.  I'd like to append new text to the description by inserting a carriage return, a date stamp, a carriage return, and the new text.  I've tried a variety of things and none of them work to insert a carriage return.

$account->description = $account->description . '/r/n' .
                                        date(DATE_RFC2822) . "/r/n" .
                                        $bean->additional_notes_c;

Note that I tried both single quotes and double quotes, neither works.  I've also tried using hex, '%10' for a LF, and '%13' for CR, that didn't work.  I also tried inserting rawurldecode("%10") and that didn't work.

What am I missing here?  Is it really that hard to get a carriage return into a textarea field?  It accepts it fine when I hit enter if I type the description in directly.

I am installing the logic hook into an OnDemand environment.

Thanks!
Eric

Outcomes