Posted
This FAQ shows you how to use an HTML 'meta refresh' header to redirect the user after a specified number of seconds.
There is a Joomla! bug in some versions that adds a charset definition if you use setMetaData(), see the last section for a workaround for this problem.
Add a Custom Code action to the On Submit action of your form and add this code to it.
<?php $jdoc = \JFactory::getDocument(); $jdoc->setMetaData('refresh', '5;url=http://example.com/index.php', true); ?>
Edit the highlighted parts of the code to set the number of seconds to delay and the URL to redirect the user to.
Variable redirection
If you want to use a variable URL - to redirect the user to different pages depending on the form results then you can set a URL using the ReDirect URL action and then use this version of the code in the Custom Code action.
<?php
$jdoc = \JFactory::getDocument();
$jdoc->setMetaData('refresh', '5;url='.$form->data['redirect_url'].'', true);
?>
Avoid the Joomla! bug
This version is less elegant but avoids the charset bug.
<?php $jdoc = \JFactory::getDocument(); $jdoc->addCustomTag('<meta http-equiv="refresh" content="5;url=http://example.com/index.php" />'); ?>