# Topic Template Placeholder Text theme component

**URL:** https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053
**Category:** Theme component
**Created:** [April 23, 2020, 7:20pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053 "2020-04-23T19:20:00Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [May 6, 2020, 2:25pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/42 "2020-05-06T14:25:54Z")

</div>

Thanks guys, after updating and a hard refresh it is now working as expected!

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [May 30, 2020, 3:17pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/43 "2020-05-30T15:17:33Z")

</div>

Just started testing this component; thanks! I’d curious about adding Placeholder text to private messages. Has anyone tried that?

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [May 31, 2020, 10:45am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/44 "2020-05-31T10:45:51Z")

</div>

Private messages have the same default placeholder text as Topic posts. It can be changed by the site administrators under the admin settings Customize \> Text. Search for js.composer.reply\_placeholder - as shown at the top of this thread.

If you use this component to customise the placeholder text for each Topic Category, the default placeholder text should only apply to the Private Messages.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [August 29, 2020, 4:35pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/45 "2020-08-29T16:35:27Z")

</div>

This theme component is really cool. I’ve been trying to find a way to give my users a little more guidance when they create a topic, and would like to make the experience more like completing a [form](https://meta.discourse.org/t/have-users-complete-form-when-creating-a-topic/162378).

Right now, this theme component makes it so that all text that is preloaded in a topic is a single placeholder. So, once a user types anything in the topic composer, all of the placeholder text goes away.

Would it be possible to have it so that there are different placeholders on the page? For example, the topic template could load a separate placeholder for:

“Name”

* * *

“Location”

* * *

“Issue”

So that when the users types in their name, the other placeholders for Location and Issue stay there, until the user types in their spots too?

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [August 31, 2020, 9:34am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/46 "2020-08-31T09:34:29Z")

</div>

The default Discourse Topic Template Text stays whilst the user is typing. It sounds like that is what you need?

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [August 31, 2020, 11:49am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/47 "2020-08-31T11:49:51Z")

</div>

**The Placeholder Approach:**

What I (and others?) would be looking for would behave more like placeholders in a form (meaning with separate form elements).

The basic default behavior now would allow me to list out different sections of the form, like what I wrote (“name”, “location”, and “issue”), but the default template behavior has the [same problems](https://meta.discourse.org/t/visual-form-entry-topic-templates/47677) as noted before–markdown makes it confusing and user can break it easily.

I think the ideal would be like a normal form, where there is a placeholder for each section (name, location, and issue), but (here’s the difference) the sections would behave independently. So when the user clicks on the name section, the placeholder “name” disappears, but the other sections stay until the user clicks on those too.

I could imagine this being possible (?) with jquery. Each section would have to have its own div with id, and then jquery would allow showing or removing the text of that particular id when the user clicks on it. This would require adding divs into the textarea, however, and I’m not sure how to do that.

I’m investigating that [here](https://meta.discourse.org/t/have-users-complete-form-when-creating-a-topic/162378).

**The Template Approach**

Probably an alternative would be that the section headers don’t “disappear” when the user clicks. So the section headers (example: Name, Location, and Issue) would be text that would stay on the page. To make it more form-like, compared to the current template default:

1. The section header text could _not_ be edited by the user (ie, `contenteditable="false"`)
2. The section break points could not be removed by the user
3. There would be space below the section header where it’s clear the user can type. In the current default template, they’d have to go to where the text is, hit `return`, to create space to type.

Perhaps this is the easier way to do it?

---

<div class="post-metadata">

### Author: ![Ed\_Bobkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_bobkov/32/200014_2.png) [@Ed\_Bobkov](https://meta.discourse.org/u/Ed_Bobkov)
#### Post date: [February 15, 2021, 11:06pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/48 "2021-02-15T23:06:08Z")

</div>

I found this setting `only apply on first post` not working.  
It doesn’t work if I want all posts in a topic have the same placeholder and deactivate the setting. I get a standard placeholder in this case.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [March 12, 2021, 12:43pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/49 "2021-03-12T12:43:14Z")

</div>

Any possibility of having a placeholder specific to replies (not the first post in a topic)? I’m hoping to give users more guidance on what can be in a reply, and a placeholder that pops up in a reply would be helpful.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [June 26, 2022, 11:57am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/50 "2022-06-26T11:57:08Z")

</div>

> [@Ed\_Bobkov](#):
>
> I found this setting `only apply on first post` not working.  
> It doesn’t work if I want all posts in a topic have the same placeholder and deactivate the setting. I get a standard placeholder in this case.

I’ve found that this works for replies _only_ if the placeholder text has more than one line. Got no idea why as the code is a bit too complicated for me.

### P.S.

While there I’ve dropped in a small PR to stop the browser console warnings:

[https://github.com/naidihr/discourse-topic-template-placeholders/pull/8](https://github.com/naidihr/discourse-topic-template-placeholders/pull/8)

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [June 26, 2022, 12:59pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/51 "2022-06-26T12:59:01Z")

</div>

Merged thank you Nathan.

---

<div class="post-metadata">

### Author: ![martyn\_thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martyn_thomas/32/344874_2.png) [@martyn\_thomas](https://meta.discourse.org/u/martyn_thomas)
#### Post date: [December 19, 2024, 12:54pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/52 "2024-12-19T12:54:25Z")

</div>

I’m having an issue where Placeholder Text doesn’t appear. What am i missing?

Template:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/a/4/4a4eabdcfdf8d6e48683252939a943758c2ac7a4.png)

Component Setting

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/9/e/69ef1ed20726aa54e7e0d716144c04391a1a5e48.png)

No placeholder/template text appears

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/4/1/44121bafb52e2a34cd2beda5dfdb5301e9e5954e.png)

When unticking “Display all your Topic Templates as placeholders”

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/6/8/26814cbc13bd9f2cd85c3be906ef251bb5aa2acc.png)

Template appears as editable text (not placeholder text)

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/d/0/0d02212a796793e1c315f704f7278b3c63cce763.png)

Edit Template Text it include [placeholder]

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/3/7/637dd5184f58edb86e3029e8d4e59098e91aaf4f.png)

Template Text disappears/no placeholder text

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/2/d/02dd9e2abbb6629cfea068215e9e328cf9788e75.png)

This is on a fresh Discourse install, no plugins/components installed - Discourse 3.4.0

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [December 19, 2024, 1:08pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/53 "2024-12-19T13:08:32Z")

</div>

Yeah it seems this theme component stop working. 🤔

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [May 22, 2025, 4:02pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/54 "2025-05-22T16:02:53Z")

</div>

This component stopped working for me.

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [June 8, 2025, 7:14pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/55 "2025-06-08T19:14:54Z")

</div>

Oh well, I can confirm it’s not working. Probably because of major recent changes on Discourse.

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [August 20, 2025, 8:48pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/56 "2025-08-20T20:48:33Z")

</div>

Hi, any hope it’s updated ? 😛

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [November 2, 2025, 4:05pm UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/57 "2025-11-02T16:05:56Z")

</div>

Hello 👋

I’ve created a PR to bring this theme component back to life and make it compatible with the latest Discourse. 🙂

[https://github.com/naidihr/discourse-topic-template-placeholders/pull/9](https://github.com/naidihr/discourse-topic-template-placeholders/pull/9)

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [November 5, 2025, 6:57am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/58 "2025-11-05T06:57:53Z")

</div>

Thanks @Don I’ve merged your pull request. Please test that’s working for you. 🙏

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [January 15, 2026, 12:00am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/59 "2026-01-15T00:00:58Z")

</div>

I’ve just re-installed and used it - seems to be working well now.

Therefore, I’ve removed the #broken tag.

---

<div class="post-metadata">

### Author: ![martyn\_thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martyn_thomas/32/344874_2.png) [@martyn\_thomas](https://meta.discourse.org/u/martyn_thomas)
#### Post date: [March 31, 2026, 1:16am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/60 "2026-03-31T01:16:55Z")

</div>

**[Admin Notice]** Theme ‘Topic Template Placeholder Text’ contains code which needs updating. (id:discourse.resolver-resolutions)

`[THEME 50 ‘Topic Template Placeholder Text’] DEPRECATION NOTICE: “site:main” is deprecated, use “service:site” instead [deprecated since Discourse 2.9.0.beta7] [deprecation id: discourse.resolver-resolutions]`

---

<div class="post-metadata">

### Author: ![Rhidian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhidian/32/176630_2.png) [@Rhidian](https://meta.discourse.org/u/Rhidian)
#### Post date: [April 14, 2026, 6:15am UTC](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053/61 "2026-04-14T06:15:57Z")

</div>

I’ve made that change and issued an update. All should be working now.

[Previous page](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053.md?page=2)

[Next page](https://meta.discourse.org/t/topic-template-placeholder-text-theme-component/149053.md?page=4)
