1. Go to this page and download the library: Download nezhura/inputmask-multi library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nezhura / inputmask-multi example snippets
use inputmaskMulti\MaskedPhoneInput;
use yii\web\JsExpression;
$inputmaskOptions = [
'showMaskOnHover' => false,
'oncomplete' => new JsExpression('function(){ alert("inputmask complete");}'),
];
$clientOptions = [
'onMaskChange' => new JsExpression('function(maskObj, completed) {console.log(maskObj, completed);}')
];
// without model
echo MaskedPhoneInput::widget([
'name' => 'my-input-name',
'inputmaskClientOptions' => $inputmaskOptions,
'clientOptions' => $clientOptions,
]);
// with model
echo $form->field($model, 'title')
->widget(
MaskedPhoneInput::className(),
[
'inputmaskClientOptions' => $inputmaskOptions,
'clientOptions' => $clientOptions,
]
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.