valekstepanov / yii2kladr
Widget for yii2 Kladr
v1.1.0
2019-05-08 11:11 UTC
Requires
- bower-asset/jquery.kladr: *
This package is auto-updated.
Last update: 2025-07-10 18:13:15 UTC
README
widgets for easy integration kladr.ru (autocomplete regions, citys, street, etc.) in Yii2
install:
composer require valekstepanov/yii2kladr
use:
$address = new Address(); // your address model
$form = ActiveForm::begin(); // your form
echo $form->field($address, 'city_id')
->widget(Kladr::className(), [
'type' => Kladr::TYPE_CITY,
'options' => [
'placeHolder' => $model->getAttributeLabel('city_id'),
'class' => 'form__input'
]
])
->label(false);