\n
line breaks in textarea inputs into appropriate formats like <br>
or \\n
before sending.Textarea values in Webflow Logic can sometimes break formatting or fail to send correctly when posting multiline input to an external API. This typically happens due to line breaks or carriage returns not being handled properly in the payload.
\n
(line breaks) which can interfere with how JSON payloads are parsed.\\n
, <br>
, etc.).\n
with another character or string like:\\n
for escaped newline (if the API expects it)<br>
for HTML-compatible line breaks\n
in textarea with <br>
→ Output: transformed-textarea
transformed-textarea
in the API payload instead of the raw textarea"message": "{{transformed-textarea}}"
Multiline textareas in Webflow Logic can misbehave due to raw line breaks. Use Logic’s Replace Text utility to normalize \n
characters before sending data to an external API. If further processing is needed, consider routing the request through middleware or a custom function.