Changing the default settings when users build polls

In my community folks always want to see who voted on a poll, but… they always seem to forget to select the check-mark Show who voted. Is there any way to set this as a default?


I don’t think there is a setting to change that behavior. But you may be able to do it from a theme component, with some custom JS. Here’s the property that controls if it is checked or unchecked: discourse/poll-ui-builder.js at main · discourse/discourse · GitHub


Polls seem to confuse almost everyone on a site I use (no ‘show who voted’, and even an insistence on using ‘multiple’ when they really meant to create a ‘single’). So I would find this theme component very useful. :+1:

I have been using it as a training exercise, but I think I may be getting confused. :slightly_smiling_face: Would it be possible to get a hint as to what I’m doing wrong?

<script type="text/discourse-plugin" version="0.8">

api.modifyClass("controller:poll-ui-builder", {
  onShow() {
     publicPoll: true,


Honestly, the first few polls I made I also had to stop and think about this. In the end I just experimented(admin privilige). What could help is making a Topic that is full of templates. However, the side effect is that many users will edit the templates and get into deeper trouble.

My recommendation would be to have a topic in your site with a title like “How to make a poll in Discourse”. In this topic use screenshots/gifs of where you demonstrate how to make different types of polls, and which settings to use.


I’ve done a couple of codeblock templates that can be one-click copied, but they’re not as prominent as the button in the :gear: icon. I do have a ‘poll guide’ on my list to do, but I’m not confident these people will read it. :slightly_smiling_face: I do like to have the guides though, so I can link to them when it crops up rather than re-type the instructions.

The users of this particular site aren’t the most tech savvy, and will avoid any feature that seems ‘complicated’. If I can smooth some of the obvious pitfalls ‘automatically’ I think that would help.

I think the change in poll UI a while back made them a little less intuitive when it comes to the ‘single choice’ versus ‘multiple choice’, as people seem to think that ‘single choice’ means single option. So they pick ‘multiple’, and adjust the min/max to make it a single choice poll. :slightly_smiling_face:

The ‘show who voted’ button is also a little tucked away at the bottom of the advanced options, when almost all of our polls would normally use it (apart from an occasional few admin ones).

But having a simple tweak to flip to ‘public=true’ as default would work really well for us (if I can figure out how to do it :slightly_smiling_face:). I’ve not thought of what I could do for the single vs multiple confusion, but if I can work out how to do the override, I may be able to do something about that too. :crossed_fingers:

1 Like

From a similar experience, any time I need to give instructions in Discourse I either request they ask in the Discourse Category we have, or I immediately write a guide. Linking the guide is faaaar better – not just on the effort front. It encourages your users to be a bit more self resourceful, shows them a refined version of the information they need, and the best part? Yeah, it gets them back on your Discourse site :partying_face: Likewise it provides them with a link they can share with other people, consequently achieving these goals on your behalf :slight_smile:

I’ve also experienced this. Similarly, it wasn’t 100% clear to me or the participants if polls were anonymous or not.

For the naming of Single versus Multiple you can modify this manually. I think this is the text:


For this, I’m thinking maybe adding a second empty poll option box would hint that it’s for multiple options but with one vote? The ‘Single Choice’ + single box may be giving it a ‘one option only’ vibe. I’m not sure though, but I thought it might be worth a try.

If this gets flipped to a feature topic, I would definitely be suggesting putting that on the front page (maybe still default true as well). :+1:

I was lured in because I misread @cocococosti’s post and thought it said ‘simple theme component’. Having re-read it, it says nothing of the sort. :slightly_smiling_face: I’ve been looking for an ‘easy’ javascript problem to work on, and this one seemed perfect as it would benefit me too. I will keep researching. :slightly_smiling_face:

1 Like