A
A
AndyDino2017-07-26 16:04:22
Yii
AndyDino, 2017-07-26 16:04:22

How to call a modal window on a click on an Html::activeTextInput text field in Yii2?

Good day to all! I want to call a modal window by clicking on a text field, in the window there will be a list of cities for selection, when clicked on, it (the city) should appear in the text field, has anyone done something like this? thank!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-07-26
@AndyDino

Learn jquery. It's not something that someone would do, it's like the simplest.

$('body').on('change','.someSelectSelector',function(){
    $('.someInputSelector').val($(this).val());
});

You can master the base in a day, read, for example, here: https://www.w3schools.com/jquery/default.asp

A
AndyDino, 2017-07-26
@AndyDino

thank! will teach!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question