APIs & Integrations

PaulAxonGarside
Participant | Diamond Partner
Participant | Diamond Partner

Line breaks missing in message

SOLVE

Hi

I'm passing in data to the message field of a form via the API, but for some reason the line breaks, which were previously present, are now missing? I've tried \n\n & \r\n but it is ignoring them in both the stored info and the email of the results?

Thanks

0 Upvotes
1 Accepted solution
PaulAxonGarside
Solution
Participant | Diamond Partner
Participant | Diamond Partner

Line breaks missing in message

SOLVE

My fubar, if you don't include the field you're passing as a field in the form you're passing the data to, in this case 'message', it ignores the line breaks. I'm assuming as it normally identifies an input as text rather than a textarea so therefore was ignoring the line breaks but still picking up the field data.

Thanks

View solution in original post

2 Replies 2
PaulAxonGarside
Solution
Participant | Diamond Partner
Participant | Diamond Partner

Line breaks missing in message

SOLVE

My fubar, if you don't include the field you're passing as a field in the form you're passing the data to, in this case 'message', it ignores the line breaks. I'm assuming as it normally identifies an input as text rather than a textarea so therefore was ignoring the line breaks but still picking up the field data.

Thanks

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Line breaks missing in message

SOLVE

Hi @PaulAxonGarside,

Can you give me an example contact in HubSpot where the form submission is missing the new lines?

0 Upvotes