Answer the question
In order to leave comments, you need to log in
Filter on one page and data on another?
Hello! Please tell me how to implement it correctly (without code, just points):
We need a separate page with a filter and a separate page with the output of filtered data.
I have a generic controller like SiteController made two actions, actionIndex and actionFilter.
In the view filter I want to make a form, but the form needs $model. So in actionFilter you need to do $model = new MyModel;
But how then to transfer the filtered data to index?
Answer the question
In order to leave comments, you need to log in
The page with the filter has a form, the form sends a get request to the index, and there everything is standard from gii. In fact, you separately render for the standard view-shki _search.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question