How should we implement polls?

OK, you should have access to

Will review and see if there are any areas that need TLC in the plugin :slight_smile:

I had a chat with @codinghorror and we would like to include the poll plugin in the Discourse source tree, so its installed and enabled by default, just like the emoji one is.

Can you put a pull request through and I will work through getting this shipshape :slight_smile:


be aware that color blind people (and people with some level of color blindness) will use the software too, so it must be accessible, not just fancy


Indeed, I am colorblind, and I use/see this type of visualization quite often. I rarely encounter any issue with color schemes as long as they were correctly selected. I believe that’d be the case for discourse as we have time, before pushing into production the feature, to pick a color scheme.


I checked the readme, and this thread, but didn’t see how to create a poll.

Could someone point us in the right direction & maybe post it here: Thanks!

Make your topic title start with "Poll: " and include a list in your post. The first list will be used. If you don’t want it to be the first list, do this:

Intro Text

 - Some list
 - Some list con't

Here are your choices:

 - Option 1
 - Option 2

Currently, the options bug out if you do any markdown other than a list, escaping the <b> and <a> tags and such, so try to avoid formatting in the choices for now until that’s fixed.


How about localized discourse instances? Is that a translatable string and how do plugins in general get translated? What if in some language it’s not correct grammar to start the title with the word for poll?


Presumably config setting for now. So if you want it to be “Schnitzel:” rather than “Poll:”.

It is a very clean design, since Polls should be identified in the topic list, and you could use this same pattern for other interesting but rare relative to the rest of discussion topic types (For Sale, etc).


The way it’s implemented currently, the string “Poll:” is stored in a locale file, and there’s only English.

This is going to make translation even harder - the translators need to keep track of the main 2 files, then 2 more files for each plugin.

I’m actually not sure that using locales to decide the prefix now because allowing users to switch locales complicates things in addition to the translation difficulty. I wonder if a site setting would be better?


Delighted this has been included!

Our first poll is live:


Are there any instructions for the use of polls other than this?

Can you make multiple selections etc?

Make your topic title start with "Poll: " and include a list in your post. The first list will be used. If you don’t want it to be the first list, do this:

Intro Text

  • Some list
  • Some list con’t

Here are your choices:

  • Option 1
  • Option 2
[/> [poll]]
1 Like

Nope, right now that is it. The polls are intentionally simple at the moment.

One thing we could do @radq, if you use a numbered list, the poll is “select one”, if you use a bulleted list, the poll is “select any”. That seems pretty logical to me.

One thing we must do is document it in for the poll plugin, as it stands there is not official documentation. @radq?


Indeed. Seems the poll plugin is now included but zero usage documentation is out there. Bump for some docs!

Edit: Derp. Seems it was already spelled out above.

I can implement this but to be honest it seems pretty arbitrary – I don’t really see the connection between a numbered list and “select one” or a bullet list and “select any”.

I’d left in the [poll]...[/poll] BBCode thinking it would be useful to specify options like this, eg. [poll select=3], [poll select=any]. It feels cleaner and is more flexible since we can also allow specifying additional options in the future if the need arises?

Sure, I can add some documentation to the README, will probably create a PR for that tonight.

@eviltrout did say in the pull request that he would post followups here regarding the feature being so hidden.



  • apples
  • bananas
  • oranges


  1. apples
  2. bananas
  3. oranges

I’m fine with leaving [poll] for super-advanced stuff, but a simple “number means you pick one” is quite clear to me. At least no less clear than the rest of Markdown… that’s how I would like it to work.


I’m not sold on it. Plus I fear you could break existing polls by implementing it that way (since the documentation is fairly empty). It would be wiser to ensure it is only capable using the bbcode or special syntax.


I actually like the way Vbulletin has its poll designed with color bars, it is easy to differentiate = )

  • you can allow multiple votes when you create a poll via a permission.

Live URL of a Poll

1 Like

For me, there’s no intuitive connection between the numbered/bulleted list and whether the poll is multichoice. Nothing about the ordered list provides a cue to me that I can only select one.

Am I wrong on the general use of these lists in thinking that unordered is a set of items, whereas an ordered list is a series/sequence? It feels like that is a separate thing to the type of choice in the poll and I can imagine situations where you would want to use either choice type with either list type.

Which steps did you find difficult?

  1. Create New Digital Ocean Droplet
  2. Access Your Droplet
  3. Install Git

Who is your favourite actor?

  • Bruce Willis
  • Jennifer Lawrence
  • Johnny Depp