Poll Plugin Developer Guide - Poll Documents
Creating Poll Document Types
The Poll plugin provides a Poll document type out of the box. It is a simple wrapper around the poll compound, which defines the core data of the poll document.
You can create your own poll document type(s) in the Configuration section of the Content application. Your document type must include the poll compound provided by the poll plugin at the document's top level, and may contain any other fields you desire. When working with your own poll document type, you will have to provide acontent bean representing your document type. Also see thepoll-docsClass andpoll-pollCompoundName parameters of the poll component. When working with apoll component which supports the explicit selection of a poll document for rendering on your site (default, recommended), you also need to create your own specialization of the PollComponent, much like the PollDcumentComponent does, limiting the document picker to your specific poll document type (see the@JcrPath annotation in thePollDocumentComponentInfo).
The default poll document type comes with apoll results plugin that shows the number of votes on the various poll values. If you want it in your own poll document type as well, copy its configuration from/hippo:namespaces/poll/polldocument/editor:templates/_default_/poll-result into your own type.
Creating Poll Documents
A poll document is a document with a 'multiple' field to hold all the available options a poll has (the possible answers). To create a new poll, navigate to the Documents section of the Content application. We'll create a new Poll document in there. From the context menu of a folder which allows the creation of poll documents, selectAdd new document. Provide a name, optionally aURL name, and in theDocument type dropdown selectPoll. ClickOK and the document editor opens to edit the new Poll document.

Now you should fill in the fields of your new poll document. The default template for rendering this data always shows the text (both when inviting to vote and when presenting the votes). The introduction is only shown when inviting to vote.
The multipleOptions field stores your answers. TheValue attribute is used internally in the repository for book-keeping, while theLabel attribute is typically rendered to the webpage. The rendering code has access to both attributes.

The next step requires that you have created at least one poll document.