From 457a2815af4095a7c02ef70002de23be56fca469 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 10 Jan 2024 09:36:01 -0600 Subject: [PATCH] fixing bugs in the health form --- layouts/shortcodes/health-form.html | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/layouts/shortcodes/health-form.html b/layouts/shortcodes/health-form.html index 4fee92c..ee21fb0 100644 --- a/layouts/shortcodes/health-form.html +++ b/layouts/shortcodes/health-form.html @@ -84,16 +84,16 @@ body: data }).then((res) => { console.log(res); - if (res.ok) { - if (mtRegistration === 'now') - window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3'; - else if (registration === 'now') - window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ'; - else if (registration === 'full') - window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE'; - else - window.location.href = '/thankyou/'; - } + /* if (res.ok) { + * if (mtRegistration === 'now') + * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3'; + * else if (registration === 'now') + * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ'; + * else if (registration === 'full') + * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE'; + * else + * window.location.href = '/thankyou/'; + * } */ }); // For use in prod @@ -150,7 +150,9 @@ document.getElementById('warning-policy').style.margin = '0'; document.getElementById('warning-image').style.margin = '0'; - // Prefill form based from MT form + } + + function firstLoad() { document.getElementById('firstname').value = firstName; document.getElementById('lastname').value = lastName; document.getElementById('parentfirstname').value = parentFirstName; @@ -164,6 +166,7 @@ } document.addEventListener('DOMContentLoaded', process); + document.addEventListener('DOMContentLoaded', firstLoad); function dated() { function nth(d) {