Answer the question
In order to leave comments, you need to log in
How to make a similar search form in Yii2 on Bootstrap?
How to make a search form similar to this one in Yii2?
The idea is to give the searcher the choice of which model to search for - the model of authors or the model of articles.
And, accordingly, how to pass the parameter of the selected model to the search () method?
Answer the question
In order to leave comments, you need to log in
Look here. bootsnipp.com/tags/search?page=2
Maybe you will find what you are looking for
There is also a layout with handles through html, and then do what you want with it!
www.yiiframework.com/doc-2.0/guide-input-forms.html
And when accepting
actionSearch() {
$form = new MyForm();
$form->load($_POST); // or $form->load($_POST, ''); — в зависимости как параметры передавать будите
if ($form->validate()) {
...
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question