{poll} asks one question with the answers of options= as radio
buttons. A visitor votes once per poll: the answer is kept in the session, and a visitor who
has voted sees the results instead of the form - a bar per answer with its share in percent.
With results everyone sees the results, also before voting, which makes a
results page.
The form is built on a {live} region and posts to the
page itself: with scripting on the vote goes in the background and the results are swapped
in; with scripting off it is an ordinary form post and the page comes back with them.
$padCsrf protects it like any other form. A GET request starts no session for a
visitor without one.
The votes are counted per answer in DATA/poll/<app>/<name>.json
under an exclusive lock. An answer taken out of options= keeps its count in the
file but shows no more. From PHP, padPollVote ( $name, $answer ) adds a vote and
padPollCounts ( $name ) reads the counts.
A name that is not a valid file name is always an error; fewer than two answers is one under the strict check. Because what it shows depends on the votes stored and on the visitor's session, the examples below are shown but not run.