PHPackages                             uz/yii2-poll - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. uz/yii2-poll

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

uz/yii2-poll
============

Widget to create custom polls for Yii 2.0 framework

v0.0.1(9y ago)07BSD-2-ClausePHP

Since Dec 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mronx/yii2-poll)[ Packagist](https://packagist.org/packages/uz/yii2-poll)[ RSS](/packages/uz-yii2-poll/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

yii2-poll
=========

[](#yii2-poll)

Poll widget for yii2

The Poll widget for the Yii2 framework allows you to create custom polls for authenticated users to vote on.

Installing

Put the widget directory in apps\\basic\\vendor\\yiisoft

To autoloading classes of widget you need add alias in extensions.php which is located in apps\\basic\\vendor\\yiisoft

array ( 'name' =&gt; 'yiisoft/yii2-poll', 'alias' =&gt; array ( '@mronx/yii2poll' =&gt; $vendorDir . '/yiisoft/yii2-poll', ) )

That's all. The widget uses mysql database. But you do not need to create tables. Widget itself will create all the necessary tables in your database.

Usage

At first, import widget classes in view file where you want create poll

use mronx\\yii2poll\\Poll; Then invoke the widget and specify the name of the poll and the response options

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

```

That's all. You will see poll with standard parameters. But you can set your parameters. You can change max width of lines, color, height and background color for lines.

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

            ]
        ]);

```

So, now you can fast and easy create the polls

If you want to change the styles for the poll form, you can do it directly in the view file of poll widget in apps\\basic\\vendor\\yiisoft\\yii2-poll\\views\\index.php

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7ecf679795f3ea88e053b8697055830481ddecb987341ccea2c22b04ec5360f?d=identicon)[uz](/maintainers/uz)

---

Top Contributors

[![professor93](https://avatars.githubusercontent.com/u/5443574?v=4)](https://github.com/professor93 "professor93 (1 commits)")

---

Tags

yii2widgetpollpoll-widgetyii2-poll-widget

### Embed Badge

![Health badge](/badges/uz-yii2-poll/health.svg)

```
[![Health](https://phpackages.com/badges/uz-yii2-poll/health.svg)](https://phpackages.com/packages/uz-yii2-poll)
```

###  Alternatives

[softark/yii2-dual-listbox

Bootstrap Dual Listbox Widget for Yii 2

20149.1k11](/packages/softark-yii2-dual-listbox)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1358.5k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
