I have this code:
<?php /** @var ActiveForm $form */ $form = ActiveForm::begin([ 'id' => 'selectAction' ]); ?> <div class="page__wrapper"> <input type="text"/> <?= $form->field($model, 'action') ->dropDownList([ 'sms' => 'Отправить SMS', 'subscribe' => 'Подписка на контент' ]); ?> <?php Pjax::begin([ 'id' => 'actionSection', ]); switch ($model->action) { case "sms": echo $this->render('form_part_sms'); break; case "subscribe": echo $this->render('form_part_subscribe'); break; default: break; } Pjax::end(); ?> </div> <?php ActiveForm::end() ?> I try to make it so that when the attribute of the model changes, the necessary part of the form is loaded via Pjax. After clicking on the link without any problems, it turns out to be done, but I cannot understand how to use change on the dropdown.
Tell me how to tell Pjax, what would it load the desired url by change in select?