davidjeddy/yii2poll

This package is abandoned and no longer maintained. The author suggests using the davidjeddy/yii2-poll package instead.

Widget to create custom polls for Yii 2.0 framework

Installs: 114

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 9

Type:yii2-extension

2.0.9 2016-11-02 04:03 UTC

This package is auto-updated.

Last update: 2019-02-20 19:25:37 UTC


README

NOTICE: No longer maintained. Superseded by https://github.com/davidjeddy/yii2-poll

yii2-poll

Poll widget for Yii 2.x allows you to create basic custom polls for authenticated users to vote on.

Installing

  • Run composer require davidjeddy/yii2poll on the terminal in your {project root}, OR add "davidjeddy/davidjeddyyii2poll": "~2" to your projects composer.json in the "required": [...] section then run composer update.
  • Enbable the module in your apps config/web.config module list

Usage

Basic:

    echo \davidjeddt\yii2poll\Poll::widget([
        'pollName'      => 'Do you like PHP?',
        'answerOptions' => ['Yes', 'No'],
    ]); 

Advanced:

    echo \davidjeddt\yii2poll\Poll::widget([
        'pollName'      => 'Do you like PHP?',
        'answerOptions' => ['Yes', 'No'],
        'params'        => [
            'backgroundLinesColor' => '#DCDCDC',// html hex 
            'linesColor'           => '#DC0079' // html hex 
            'linesHeight'          => 20,       // in pixels
            'maxLineWidth'         => 200,      // in pixels
        ]
    ]);