davidjeddy/yii2-poll Widget to create custom polls for Yii 2.0 framework

yii2-poll

  1. Badges
  2. About

Badges

SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads

About

Create a basic custom polls for Yii 2.x.

Installing

  • Run composer require davidjeddy/yii2-poll on the terminal in your {project root}
    • OR add "davidjeddy/yii2-poll": "~2" to your projects composer.json in the "required": [...] section then run composer update.
  • Run migration via Yii's migration command providing php ./console/yii migrate/up --migrationPath=./vendor/davidjeddy/yii2-poll/migrations

Usage

Basic: `PHP

echo \davidjeddy\poll\PollWidget::widget([
    'questionText'  => \Yii::t('poll', 'Do you like PHP?'),
    'answerOptions' => ['Yes', 'No'],
]);


Advanced:
```PHP
    echo \davidjeddy\poll\PollWidget::widget([
        'questionText'  => \Yii::t('poll', 'Do you like PHP?'),
        'answerOptions' => ['Yes', 'No'],
        'params'        => [
            'backgroundLinesColor' => '#DCDCDC',// html hex
            'linesColor'           => '#DC0079' // html hex
            'linesHeight'          => 20,       // in pixels
            'maxLineWidth'         => 200,      // in pixels
        ]
    ]);
0 1
1 follower
308 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: Others
Developed by: David J Eddy
Created on: Apr 10, 2018
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions