How to insert Custom Field with break line data

Hi all,

I’m updating custom field via REST

custom field is Text Area and I have few lines of data that I need to put in there.

In form of:

“Line 1

JSON request doesnt allow this kind of request:

{“custom_fields”: [
“id”: 305,
“content”: “line 1
line 2”

if I put /n then it saves that inside custom field and entry looks like this:

“Line 1/nLine2” which is obviously not good…

is there any solution for this?



will actually parse as new line :slight_smile:

I don’t know what you’re using to submit this (PHP?) but if you can merge the string with chr(10), I believe that does the trick.

I’m struggling with this these days. I’m using the official SDK to update custom fields, and adding “\n” via the SDK causes a literal “\n” to appear in the textarea field. If I use jQuery in the Dev tools, then “\n” get converted into newlines. All in all, it’s pretty odd behavior. @John_Borelli char(10) seems to be just “\n” or is there a special meaning to it (I’m using PHP, by the way)?

Just wanted to say that chr(10) in PHP really does the trick, while “\n” doesn’t. If someone else is developing in PHP, please concatenate your strings with char(10) and it will introduce a nice line-break in the custom textarea field.