baha2odeh/yii2-pincode-input

Yii2 Bootstrap Pincode Input

Installs: 1 736

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 2

Open Issues: 0

Type:yii2-extension

1.3.2 2020-05-18 09:24 UTC

This package is auto-updated.

Last update: 2024-04-29 04:12:56 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 baha2odeh/yii2-pincode-input "*"

or add

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

for bootstrap 4

"baha2odeh/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 :

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

JsOptions

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