A
A
Alexander Shirobokov2015-10-11 21:55:14
Yii
Alexander Shirobokov, 2015-10-11 21:55:14

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

2 answer(s)
A
Andrey Pavlenko, 2015-10-11
@Akdmeh

Try to specify the form action explicitly:
$form=ActiveForm::begin(['action'=>['desired action'], 'method'=>'get']);

A
Alexander Makarov, 2015-10-11
@SamDark

Set up URLManager.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question