Difference between #7 and #8 of
FORM with GET method causes repeated stacking of URL Parameters

Revision #8 has been created by toph on May 6, 2014, 1:06:04 PM with the memo:

Fixed bug in `$this->createUrl()`. First parameter should be a string not an array.
« previous (#7)

Changes

Title unchanged

FORM with GET method causes repeated stacking of URL Parameters

Category unchanged

Tips

Yii version unchanged

Tags unchanged

yii2, form, get, parameter, stacking, hidden, input, repeat, repetition

Content changed

[...]
]);

// In Yii 1.x
$form = $this->beginWidget('CActiveForm', [
'method' => 'get',
'action' => $this->createUrl(
['order/index']), ]); ``` This will automatically use the action URI set above for each form submission rather than relying on the URL from the address bar. Thus the URL parameter repetition and stacking will not happen.
7 2
41 followers
Viewed: 61 499 times
Version: all
Category: Tips
Written by: Kartik V
Last updated by: toph
Created on: May 6, 2014
Last updated: 9 years ago
Update Article

Revisions

View all history