Answer the question
In order to leave comments, you need to log in
ActiveForm and GET send method, how to remove duplicate parameters in hidden fields?
I am using yii2.
After the form is submitted by a get, the parameters are "glued to the url" and then inserted as hidden fields into the form, which causes duplication of the parameters and the increase in the get string to infinity when the form is resubmitted.
How to remove hidden fields?
Answer the question
In order to leave comments, you need to log in
Try to specify the form action explicitly:
$form=ActiveForm::begin(['action'=>['desired action'], 'method'=>'get']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question