Help:Polls

From AIOWiki
Jump to navigation Jump to search

Use this page as a guide to creating polls on AIOWiki.


Creating a Simple Poll

  • First you need a question and different responses for people to vote on.
  • Next, insert a poll on the desired page by using the code below:
<qpoll id="replace this with a unique ID">
{replace this with your poll question
|layout="proposals transpose" type="()"}

Pick one
</qpoll>

Replace the question with what you want. Be sure to replace the unique ID with a name that is different than other polls that are on the same page.

  • Now you have to add the options that users will vote on. On the fourth line of code (the blank space), type each option with "|" before it.

Example:

<qpoll id="help_example">
{Do you think that this poll is cool?
|layout="proposals transpose" type="()"}
|Yes
|No
Pick one
</qpoll>

The result should be something like this:

<qpoll id="help_example"> {Do you think that this poll is cool? |layout="proposals transpose" type="()"} |Yes |No Pick one </qpoll>

  • That's it! Now just preview the page to make sure it looks right, then save. The results of any poll will be hidden unless you follow these steps to display them.

If you want to customize your poll, read the section Other Settings.

If you want to experiment, please use the sandbox.

Showing the Results

When you want to display the results of your poll, you just have to add this line of code:

showresults="2;color:blue;background:yellow;textcolor:#0000FF;"

So you should end up with this (added code is in bold):

<qpoll id="help_example" showresults="2;color:blue;background:yellow;textcolor:#0000FF;">
{Do you think that this poll is cool?
|layout="proposals transpose" type="()"}
|Yes
|No
Pick one
</qpoll>

And when you save the page, you should get something like this:

<qpoll id="help_example_results" showresults="2;color:blue;background:yellow;textcolor:#0000FF;"> {Do you think that this poll is cool? |layout="proposals transpose" type="()"} |Yes |No Pick one </qpoll>

Other Settings

Multiple Choices

If you want to let users vote for more than one option, just replace this line of code:

|layout="proposals transpose" type="()"}

with this:

|layout="proposals transpose" type="[]"}