# Form template composer fields lose their newlines in the edit preview

**URL:** https://meta.discourse.org/t/form-template-composer-fields-lose-their-newlines-in-the-edit-preview/411146
**Category:** Bug
**Tags:** form-templates
**Created:** [August 28, 2026, 1:24pm UTC](https://meta.discourse.org/t/form-template-composer-fields-lose-their-newlines-in-the-edit-preview/411146 "2026-08-28T13:24:25Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![tannerabread](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tannerabread/32/526153_2.png) [@tannerabread](https://meta.discourse.org/u/tannerabread)
#### Post date: [August 31, 2026, 8:43pm UTC](https://meta.discourse.org/t/form-template-composer-fields-lose-their-newlines-in-the-edit-preview/411146/3 "2026-08-31T20:43:11Z")

</div>

Hi @ScaryLarryGames1, thank you for reporting this.

The fix ended up being what you suggested with the `textarea` and has just been merged. Give it a few to go through CI/CD and make it to the `latest` branch.

> <https://github.com/discourse/discourse/pull/43043>
>
> Follow up to #42192, which switched the composer field's hidden validation stand…-in from \`type="hidden"\` to \`type="text"\` so \`required\` would fire on submit. Text inputs strip CR/LF on value assignment per the HTML value-sanitization rules, and the reply body is assembled from these controls via \`new FormData(form)\`, so multi-line composer input came out flattened in the edit preview. Saved posts were unaffected because the raw source is read from the editor directly.
> 
> Swap the stand-in to a visually hidden \`\<textarea\>\`. Textareas participate in constraint validation just like text inputs, preserving the required-field enforcement from #42192, but do not sanitize newlines, so multi-line content survives in the preview.

---

_[View the full topic](https://meta.discourse.org/t/form-template-composer-fields-lose-their-newlines-in-the-edit-preview/411146)._
