Answer the question
In order to leave comments, you need to log in
How to save or display in the kladr database not the id but the name of the city, street and house?
I use the kladr widget because it seemed more convenient, but I need not to save the id in the database, because the id is displayed there, namely the name of the street, city, and so on.
That is, with this code
<?= $form->field($model, 'street')->widget(Kladr::className(), [
'type' => Kladr::TYPE_STREET,
'options' => [
'placeholder' => 'Улица',
'class' => 'form-control'
]
])->label(false) ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question