baha2odeh / yii2-pincode-input
Yii2 Bootstrap Pincode Input
Installs: 1 769
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bootstrap-pincode-input: 1.7.0
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-bootstrap: ~2.0.0
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) ?>