fixing bugs in the health form

This commit is contained in:
Chris Cochrun 2024-01-10 09:36:01 -06:00
parent b7016133e9
commit 457a2815af

View file

@ -84,16 +84,16 @@
body: data body: data
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);
if (res.ok) { /* if (res.ok) {
if (mtRegistration === 'now') * if (mtRegistration === 'now')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3'; * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13DM3';
else if (registration === 'now') * else if (registration === 'now')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ'; * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
else if (registration === 'full') * else if (registration === 'full')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE'; * window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
else * else
window.location.href = '/thankyou/'; * window.location.href = '/thankyou/';
} * } */
}); });
// For use in prod // For use in prod
@ -150,7 +150,9 @@
document.getElementById('warning-policy').style.margin = '0'; document.getElementById('warning-policy').style.margin = '0';
document.getElementById('warning-image').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('firstname').value = firstName;
document.getElementById('lastname').value = lastName; document.getElementById('lastname').value = lastName;
document.getElementById('parentfirstname').value = parentFirstName; document.getElementById('parentfirstname').value = parentFirstName;
@ -164,6 +166,7 @@
} }
document.addEventListener('DOMContentLoaded', process); document.addEventListener('DOMContentLoaded', process);
document.addEventListener('DOMContentLoaded', firstLoad);
function dated() { function dated() {
function nth(d) { function nth(d) {