1. Go to this page and download the library: Download mitisk/yii2-phone-input 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/ */
mitisk / yii2-phone-input example snippets
// add this in your view
use Mitisk\Yii2PhoneInput\PhoneInput;
// Usage with ActiveForm
$form = \yii\widgets\ActiveForm::begin();
echo $form->field($model, 'phone')->widget(PhoneInput::class, [
]);
\yii\widgets\ActiveForm::end();
// add this in your view
use Mitisk\Yii2PhoneInput\PhoneInput;
// Usage with model and without ActiveForm
echo PhoneInput::widget([
'model' => $model,
'attribute' => 'password_1'
]);
// add this in your view
use Mitisk\Yii2PhoneInput\PhoneInput;
// Usage without a model or ActiveForm
echo PhoneInput::widget([
'name' => 'password_2'
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.