smartysoft/yii2-pincode-input

Yii2 Bootstrap Pincode Input

Installs: 110

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 2

Type:yii2-extension

2.3.1 2020-10-17 18:27 UTC

This package is not auto-updated.

Last update: 2024-03-19 02:06:59 UTC


README

Yii2 Bootstrap Pincode Input

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist smartysoft/yii2-pincode-input "*"

or add

"smartysoft/yii2-pincode-input": "*"

for bootstrap 4

"smartysoft/yii2-pincode-input": "dev-bs4"

to the require section of your composer.json file.

Usage

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

<?= \smartysoft\PincodeInput\PinCodeInput::widget([
                                'model' => $model,
                                'attribute' => 'pincode',
                                'jsOptions' => [
                                    'hidedigits'=>false,
                                    'inputs'=>4
                                ],
                            
                            ]) ?>
<?= $form->field($model, 'pincode')->widget(\smartysoft\PincodeInput\PinCodeInput::className(), [
                                'jsOptions' => [
                                    'hidedigits'=>false,
                                    'inputs'=>4
                                ],
                            ])->label(false) ?>

JsOptions

http://fkranenburg.github.io/bootstrap-pincode-input/