widgets for easy integration kladr.ru (autocomplete regions, citys, street, etc.) in Yii2
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
.gitignore
Kladr.php
KladrApi.php rebuild Jul 1, 2016
Object.php
Query.php
README.md
composer.json

README.md

yii2-klard

widgets for easy integration kladr.ru (autocomplete regions, citys, street, etc.) in Yii2

install: composer require andkon/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);