Form Redirect From External Site

This page provides details on setting up the form redirect template.

📘

With the new features of some browsers there are conditions when cookies are sent back to a website, and as a result, it is now required in some circumstances to use a HTML page with an auto submitting form to redirect a user.

At the time of writing this (June 2020), the known use cases for this form redirect are:

  • Adyen payment with Safari 13+ browser

Overview

The template used for form redirects is "generic/form-post-redirect.tpl.html" which is available as "example.com/generic/form-post-redirect.tpl.html" from the Aurora Demo templates.

If the template is not present you will be presented with the following error in the Aurora Backend:

Template for automated redirects does not exist: generic/form-post-redirect.tpl.html

The template should be added as soon as possible to avoid causing any problems for certain browsers i.e. Safari v13

Current Template

The form data is safely escaped by default and escaping is not required to be added to the below template. HTML escaping is done whether the automatic escaping is turned on or off ( see "Template Variable Escaping" on Template Overview for further information on escaping).

generic/form-post-redirect.tpl.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{site_text page="Global" part="Text: Please wait while you are redirected ..."}</title>
</head>
<body>
    {* DO NOT CHANGE THE BELOW *}
    <p><p>{site_text page="Global" part="Text: Please wait while you are redirected ..."}</p></p>
    <form id="redirect_form" method="POST" action="{$redirect_form_action}">
        {foreach from=$redirect_form_data key="name" item="value"}
            <input type="hidden" name="{$name}" value="{$value}" />
        {/foreach}
    </form>
    <script type="text/javascript">
        document.getElementById("redirect_form").submit();
    </script>
    {* DO NOT CHANGE THE ABOVE *}
</body>
</html>

🚧

It is recommended to always retrieve the latest version of this template from Aurora Demo.