diff --git a/src/RedirectionForm.php b/src/RedirectionForm.php index 4d0c4a2e..8479f20d 100644 --- a/src/RedirectionForm.php +++ b/src/RedirectionForm.php @@ -174,6 +174,16 @@ public function render() : string return call_user_func_array($renderer, $data); } + /** + * Returns the target URL. + * + * @return string target URL + */ + public function getTargetUrl(): string + { + return $this->getAction() . '?' . http_build_query($this->getInputs()); + } + /** * Retrieve JSON format of redirection form. *