Skip to content

Commit a29c8cc

Browse files
committed
Form: do not send 'do' when action is changed
1 parent 953000a commit a29c8cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Application/UI/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function beforeRender()
124124
{
125125
parent::beforeRender();
126126
$key = ($this->isMethod('post') ? '_' : '') . Presenter::SIGNAL_KEY;
127-
if (!isset($this[$key])) {
127+
if (!isset($this[$key]) && $this->getAction() !== '') {
128128
$do = $this->lookupPath(Presenter::class) . self::NAME_SEPARATOR . 'submit';
129129
$this[$key] = (new Nette\Forms\Controls\HiddenField($do))->setOmitted();
130130
}

0 commit comments

Comments
 (0)