Creating a Custom Thank You Page with Auto-Redirect

February 11, 2023

This guide shows a sample code that you can use if you want your form to redirect to another website or back to the form after submission with a countdown timer.

Here’s how to set it up:

  1. Paste the following code in your text editor.
<div style="text-align:center;">
<h1>Thank you!</h1>
<p>Your submission has been received.</p>
<p>This page will redirect in <span id="timer"></span>s.</p>
</div>
<script type="text/javascript">
var count = 7; // The delay in seconds before redirecting.
var redirect = "https://www.jotform.com"; // The redirection's landing page.
function countDown() {
if(count >= 0){
document.getElementById("timer").innerHTML = count--;
setTimeout("countDown()", 1000);
}else{
window.location.href = redirect;
}
}
countDown();
</script>
  1. Change the values in red to your preferences.
  2. Save it as an HTML file (e.g., thankyou.html) and upload it to your server.
  3. Get the link to your HTML file and set it as your form’s Thank You page.
Form Builder Thank You Page Settings

To learn more, see Redirecting Users to a Different Page. Here’s a demo form with the setup above applied that you can try out.

Academy Logo

Introduction to Form Building

Thank You Pages

Go to course :Thank You Pages
lesson-2 - image
Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comments:

  • syed - Profile picture
  • Praise Ernest O - Profile picture
  • Manu - Profile picture
  • NXcontact - Profile picture
  • Avinash kumar - Profile picture
  • m - Profile picture
  • manager.event.center - Profile picture
  • ravi - Profile picture
  • Chuxin Liang - Profile picture
  • Mellow - Profile picture
  • Thosbryan - Profile picture
  • giacosmom - Profile picture
  • MGSI - Profile picture
  • jeffwatson - Profile picture
  • jrkconsult - Profile picture
  • dennis - Profile picture
  • sadasd - Profile picture
  • adminuoem - Profile picture
  • Kevin Robertson - Profile picture
  • UBTMarketing - Profile picture
  • ksesock - Profile picture
  • carolinasuccessteam - Profile picture
  • Free Games Download - Profile picture
  • ashwini - Profile picture
  • AmSteve - Profile picture
  • akbar - Profile picture
  • Pharme50 - Profile picture
  • Pharma827 - Profile picture
  • suganya - Profile picture
  • sriraga - Profile picture
  • padmavathi - Profile picture
  • Arun thakur - Profile picture
  • klaed - Profile picture
  • FUNDAORIGEN - Profile picture
  • uniqueallianceva - Profile picture
  • jaures - Profile picture
  • جوري - Profile picture
  • tehnath - Profile picture
  • magicjack335 - Profile picture