Create polls on your website

The package implements the typical poll functionality in a simple and easy way. Questions and answers are maintained as global data. Polls can change according to a schedule or be individually selected at the function level. If a specific poll is not selected, the poll with the most recent publishing (active) date is automatically shown.

The poll results can be presented as a pie chart.

How to implement Composite.Community.QuickPoll

  1. Add questions to the Composite.Community.QuickPollQuestion datatype.
  2. Add possible answers for these questions to the Composite.Community.QuickPollAnswer datatype.
  3. When adding questions to the Composite.Community.QuickPollQuestion datatype, specify the Active from date value (the date from which poll will be displayed on a page). The poll will not be displayed if no date is specified (see also Important Notes below).
  4. From the Content or Layout perspective, insert the Composite.Community.QuickPoll function ( Insert > Function), or add the following code:

     
    <f:function name="Composite.Community.QuickPoll" xmlns:f="http://www.composite.net/ns/function/1.0"> 
      <f:param name="SubmitTitle" value="Submit" /> 
      <f:param name="ChartType" value="Simple BarChart" /> 
    </f:function>
  5. Specify the function's parameters:

    • Question: A question to be displayed in the poll on a page. By default, it shows the latest active poll. To override this default behavior, choose to specify a simple value and select a question from the list (see also Important Notes below).
    • Submit Title: The label for the Submit button on the poll. By default, this value is set to "Submit". To override the value, choose to specify a simple value and enter your own one.
    • ChartType: The type of the chart to represent data: Simple BarChart (default), Google BarChart, Google PieChart, Google ColumnChart.

Important Notes

  • If you select a specific question for the Question parameter of the Composite.Community.QuickPoll function, the Active form date value (see Step 2 above) on the question will be ignored and the poll will displayed regardless this date.

Customization

You can customize the layout by editing its style sheets:

  • /Frontend/Composite/Community/QuickPoll/Styles.css

Requirements

Composite C1 version 2.0 or later

SHARE