diff --git a/demos/others/sticky2.php b/demos/others/sticky2.php index fb0b911952..eb82d58426 100644 --- a/demos/others/sticky2.php +++ b/demos/others/sticky2.php @@ -53,7 +53,7 @@ $frame = View::addTo($app, ['ui' => 'green segment']); Button::addTo($frame, ['does not inherit sticky get']) ->on('click', static function () use ($app) { - return new JsToast('$_GET = ' . $app->encodeJson($_GET)); + return new JsToast('$_GET = ' . $app->encodeJson($app->getRequest()->getQueryParams())); }); Header::addTo($app, ['Use of View::url()']); diff --git a/src/Form.php b/src/Form.php index e5bd4e4317..5182e4f844 100644 --- a/src/Form.php +++ b/src/Form.php @@ -436,7 +436,7 @@ public function controlFactory(Field $field, $controlSeed = []): Control */ protected function loadPost(): void { - $postRawData = $_POST; + $postRawData = $this->getApp()->getRequest()->getParsedBody(); $this->hook(self::HOOK_LOAD_POST, [&$postRawData]); $errors = [];