Answer the question
In order to leave comments, you need to log in
How not to produce parameters in the url after repeated GET requests through a form in Yii?
Hello! Help me to understand.
There is a site on yii with a form of filters. The form sends a get request to filter the selection results. Each time the form is submitted, the list of parameters in the browser url increases.
For example, when you select the parameters for the first time and click the "Show" button, the url becomes like this:
http://name_domain.ru/list/page1.html?CategoryFilterForm[proportions]=
&CategoryFilterForm[seria]=&CategoryFilterForm[seria][]=Кошки
&CategoryFilterForm[availability]=&yt1=Показать
http://name_domain.ru/list/page1.html?CategoryFilterForm[proportions]=
&CategoryFilterForm[seria]=&CategoryFilterForm[seria][]=Кошки
&CategoryFilterForm[availability]=&yt1=Показать
&CategoryFilterForm[proportions]=&CategoryFilterForm[seria]=
&CategoryFilterForm[seria][]=Кошки&CategoryFilterForm[seria][]=Собаки
&CategoryFilterForm[seria][]=Лошади&CategoryFilterForm[availability]=&
yt1=Показать
$CategoryFilter = new CategoryFilterForm;
$ComformCategoryFilter = $this->beginWidget('CActiveForm', array(
'id' => 'categoryfilter-form',
'method' => 'get',
'enableClientValidation' => true,
'clientOptions' => array(
'validateOnSubmit' => true,
),
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question