How to populate fields based on select dropdbox


I am new to yii2.

With PHP and Jqeury I would normally populate form fields based on the selection of a dropdown menu by using the data attribute in jquery.

How to do this with yii2 please? Is there any easy method of doing this?

Thank you.

Maybe ? ->

Thank you.