T
T
teodor7teodor72017-01-11 11:39:55
Yii
teodor7teodor7, 2017-01-11 11:39:55

How to remove form title in Yii2 get request?

The error is that when passing in a get request, the form name and field are passed each time.

http://Site.loc/exchange?ExchangeSearchForm%5Bcountry_id%5D=&ExchangeSearchForm%5Bcountry_id%5D%5B%5D=1&ExchangeSearchForm%5...

so the line is too big and 414 Request-URI Too Long falls out
, is it possible to remove this somehow?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-01-11
@teodor7teodor7

This is not the name of the form, in fact it is the name of the model, and then removing it will have to dance with a tambourine so that model->load() and your SearchModel would work. But this is solvable.
The main questions are:
why not hide this bunch of parameters in the POST request?
why not rename "ExchangeSearchForm" to "Esf" and all the parameters (attributes) can be reduced to 2-3 characters, since such a locomotive is obtained? In this case, the changes will affect only the ExchangeSearchForm model.

A
AlikDex, 2017-01-11
@AlikDex

If you understand what I'm talking about, then the answer is here : stackoverflow.com/questions/21779085/yii2-how-does
... Either tonight or tomorrow, if needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question