Running a poll
Collecting options
How options are gathered, validated, reordered, and why they freeze when voting starts.
An option is one thing people can vote for. Every option has a subject — a short name — and optionally a description saying why it deserves a vote. Who submitted it is read from their account, never typed in.
Who may add options
The poll's option mode decides this.
Only the owner adds options. You write the list. You can do it while the poll is still a draft, so a poll can go straight from draft to voting with a complete list.
Participants may add options. Anyone who can reach the poll may propose options, once signed in, and only while collection is open. Contributing your first option joins you to the poll automatically — there is no separate step — and the suggestion is credited to the name on your profile. You are never asked to type a name beside it.
The owner can always add options in either mode.
Approving what participants suggest
A poll open to participants can also ask that the organiser approve each suggestion before it counts. It is off unless the organiser turns it on, and it applies only to suggestions from other people — the organiser's own options are live the moment they are written.
While a suggestion is waiting:
- only the person who made it and the poll's organiser can see it. Nobody else knows it exists;
- it is not on the ballot, and it does not count towards the two options a poll needs before voting can start;
- the person who made it sees it on the poll page, marked as awaiting approval, so a suggestion never simply vanishes into a form.
The organiser accepts it, or does not. Refusing can carry a short reason, and either way the person who suggested it is told. Nothing is ever deleted: a suggestion that was refused, or that nobody got round to, keeps its place in the poll's record for the organiser and for administrators to read.
Approval outlives collection. Suggestions stop being accepted at the collection deadline, but the organiser can go on approving what is already in the queue right up until voting opens. After that the options are fixed — for the same reason they are fixed for everyone else, because a ballot has to mean the same thing for the first voter as for the last.
Anything still waiting when voting starts never joins the poll. If that leaves fewer than two approved options, voting does not start at all, and the organiser is told how many suggestions are waiting on them rather than being shown a count they can see is wrong.
If the organiser turns the setting off again, everything still waiting is accepted at once — the setting going away means nothing needs approving. Refusals stand: turning the setting off does not unmake a decision that was already taken.
Managing options as the owner
The management screen lists every option with an inline edit form and a remove button, plus a display order panel where you assign each option a position with a dropdown.
Display order affects only what participants see before they vote. It has no effect on scoring — the Borda count uses the ranks each participant chose, not the order you listed things in.
Validation
A subject is required; a description is optional. Both are checked beyond merely being present:
- Whitespace is collapsed.
" Serra da Estrela "is stored as"Serra da Estrela". - Punctuation-only subjects are rejected.
" ","---"and"...!?"are not option names. A subject must contain at least one letter or digit. - A blank description becomes nothing at all. An empty string, spaces only and no description whatsoever are all stored the same way, so "no description" has one representation rather than three.
- Near-duplicates are refused. Case, accents and spacing are folded before comparing, so
"serra DA estrela"will not sit beside"Serra da Estrela". The comparison is per poll, so the same subject in a different poll is fine. - Length limits apply: 160 characters for a subject, 2000 for a description.
- Attribution cannot be supplied. There is no name field, and a name or user id sent in the request is discarded before validation — it is read from the signed-in account instead.
Everything is escaped on the way out. A description containing <script> is displayed as text — it is
never rendered as markup.
Editing and withdrawing
The owner can edit or remove any option while the poll is a draft or collecting options.
A participant can edit or withdraw their own option only if all three of these hold:
- the poll allows participant option edits,
- collection is still open, and
- it is the option they submitted.
Anyone else attempting it gets an authorization error, whichever route they try.
Options freeze when voting starts
Once voting opens, options become permanent. No edits, no removals, no additions — for anyone, including the owner.
This is not a policy that could be forgotten. The database is the guarantee: the tables holding ranked
preferences and approval selections refer to options with a RESTRICT foreign key, so the database
itself refuses to delete an option any ballot points at.
The reason is simple. A ballot says "this participant ranked that option second". Change or delete the option and the ballot becomes a claim about something that no longer exists, and the published result would be unverifiable.
Two options minimum
Voting cannot open until the poll has at least two options. A choice between one thing is not a choice.
If the voting window arrives and the poll has fewer than two, it stays in collecting options and the management page tells you why. If the whole voting window then elapses without enough options, the poll closes with no ballots — a poll that never happened, recorded honestly rather than silently discarded.
Deadlines and countdowns
Both the poll page and the dashboard card show the next deadline as an absolute date in the poll's time zone, with a live countdown beside it. The absolute date is always rendered server-side, so it is there whether or not JavaScript runs.