How to Add Category-specific Message Above Topic Editor

We would like to provide our members with detailed instructions about what to include in their topics. We’ve found that using the topic template to do this appears messy and we’d prefer that the user not have to delete it every time they post.

Instead, we’d like to display a unique message above the reply area based on which category the user has selected in the dropdown.


55%20PM


Does anyone have recommendations about how we might best create this functionality?

We’d greatly appreciate any advice you can share. Thanks!

cc @timmch

a) nobody is going to read this, even though you hope they will… they won’t.

b) why specifically are templates not working? It’d be more useful to drill into that and get details and examples.

1 Like

I’ve been meaning to request this as well, we have some categories that need fairly specific instructions. I get that most people won’t read this, but I still think it would be a great addition for those that do and gives us something to point to when they don’t follow the guidelines rather than just the pinned topic which nobody reads either.

1 Like

@codinghorror Thanks for your swift reply :bowing_man:

a) Is your perspective based on previous attempts at adding messages in this location? I’d like to learn more about why it didn’t work and what the specific use case was.

b) When using a topic template, we can’t style the text. We can use markdown so that it appears styled in the preview on the right but the textbox gets filled with raw markdown text — which might look strange to new users who aren’t yet familiar with it.

Similar to what @davidkingham said, we have categories that could benefit from specific instructions and showing them inline with the reply editor seems better than using a template or assuming they’ll read the pinned topic.

2 Likes

https://blog.codinghorror.com/teaching-users-to-read/

etc etc etc. I can do more Google searches on your behalf, or … you could search yourself. :wink:

3 Likes

That’s what topic templates are for; use them.

If you really must put more text on the new topic area that absolutely nobody will read, perhaps there’s a way with CSS. I’m unsure because I have so very little enthusiasm for this idea that I have, in fact, actually died just now. I’m dead. RIP me. :skull_and_crossbones:

3 Likes

@codinghorror No need to google for me, I’ve read similar articles before. I was wondering if you or others had experimented with including messages here and if that had more specifically led you to the conclusion that a pinned topic or similar was the best approach to providing instruction.

Please avoid replying if this will double-kill you. I want no harm to come of you good sir :bowing_man:

I dunno, running Stack Overflow? Running Discourse? Writing a blog for 14 years? Pretty much every fiber of my life experience in computing since the day I was born says users will not read anything. At least not those users who you’d really, REALLY like to read.

The better question to ask, when thinking “why can’t I force users to do {x}”, is this:

Why aren’t users already doing what I want them to do?

You will find this a much more productive line of thought. Now, if you don’t mind, I’ll return to my grave.

4 Likes

Hahaha tell us how you really feel Jeff :laughing:

I don’t use them except when there are specific things to fill out where the user doesn’t have to delete the text, but for just information where they have to delete it, it’s a really terrible user experience.

I have edited the js.composer.reply_placeholder which gets me 75% of what I want, but to have some extra information for each category would be a nice option.

I hope you rise from the dead to continue the awesome work on discourse :+1: :smiley:

I agree @davidkingham

You can use HTML comments in the template if you don’t want it to show up in the post and also not force people to delete it.

<!--
INSTRUCTIONS
Please make sure to include the full asset number on the sticker.
-->
3 Likes

I’m planning to continue exploring building out the functionality mentioned above.

However, I appreciate you sharing this clever workaround @riking :+1:

1 Like

Reviving this topic as we now have this theme component which could help meet this requirement?

3 Likes