diff --git a/layouts/shortcodes/mt-form.html b/layouts/shortcodes/mt-form.html
index b3d5349..5f9e933 100644
--- a/layouts/shortcodes/mt-form.html
+++ b/layouts/shortcodes/mt-form.html
@@ -12,11 +12,16 @@
data.append("age", age);
var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function() {
+ if (this.readyState == 4 && this.status == 200) {
+ window.location.href = '/thankyou/';
+ }
+ };
xhr.open("POST", "https://n8n.tfcconnection.org/webhook/mt-application");
xhr.send(data);
console.log(data);
console.log("Hallo!");
- return false;
+ /* return false; */
}
function calculate_age(dob) {