Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

extead/yii2-autonumeric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoNumeric plugin

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
                ]
            ]);?>

About

Yii2 extension for format inputs based on AutoNumeric.js

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages