extead/yii2-autonumeric

Input format extension for Yii 2.0 based on autoNumerical plugin

Installs: 13 616

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 4

Open Issues: 2

Type:yii2-extension

v0.1.2 2018-05-04 11:43 UTC

This package is auto-updated.

Last update: 2024-04-22 16:19:54 UTC


README

Input format extension for Yii 2.0 based on autoNumerical plugin https://github.com/BobKnothe/autoNumeric

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist extead/yii2-autonumeric "*"

or add

"extead/yii2-autonumeric": "*"

to the require section of your composer.json file.

Usage

For all pluginOptions see autoNumeric docs - https://github.com/BobKnothe/autoNumeric.

Once the extension is installed, simply use it in your code by :

<?=$form->field($model, 'price')->widget(\extead\autonumeric\AutoNumeric::classname(), [
                'pluginOptions' => [
                    'aSep' => ' ',
                    'mDec' => 0
                ]
            ]);?>