C
C
Carlos Rodriguez2015-01-12 11:22:05
Yii
Carlos Rodriguez, 2015-01-12 11:22:05

Yii2. \yii\bootstrap\Modal how to change view depending on action?

I transfer authentication to a modal window.
How to make it so that on clicking on the "Retrieve password" link in this modal window, the result of rendering actionForgotPass was loaded, and on submit, the previous action (actionAuth) was rendered?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LAV45, 2015-01-13
@LAV45

class DefaultController extends Controller
{
    public function actionIndex()
    {
        /** ваш код */
        $this->renderAjax('index', [
            /** params */
        ])
    }
}

There is renderAjax which will send you the layout of only the 'index' view.
Your form may be there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question