Craft CMS Poll plugin v1.3.0
This plugin has been abandoned and no upgrade for Craft 5.x is planned!
More Craft plugins

Advanced configuration

The poll plugin sets up a matrix field that contain the answers, a section that contains the polls and a field that makes it easy to add polls to existing content.

These fields and sections have handles that may be configured. In some cases you might want to specify non-default handles for your site (for example if they conflict with existing handles).

Caution: If you modify handles after the poll plugin is already in use and set-up, you should rerun the setup and manually remove old handles and content if you choose to.

You can do so by placing a file 'poll.php' in your craft config directory:


/config/poll.php:
<?php

// example config file to override section handles etc
// these settings would override the settings set from the CP
return [
    // configure handles for installation

    // the section containing polls
    // default: pollSection
    'sectionHandle' => '',

    // the field that is generated to select a poll
    // default: selectedPoll
    'selectPollFieldHandle' => '',

    // the matrix that contains 'answers'
    // default: pollAnswerMatrix
    'answerMatrixFieldHandle' => '',

    // within the answerMatrixFieldHandle, a block is created that will contain the answers.
    // this is the handle for that block.
    // default: answer
    'matrixBlockAnswerHandle' => ''

];