moving to using a rust api

This commit is contained in:
Chris Cochrun 2024-01-08 10:51:53 -06:00
parent 2d1424aeb2
commit f00ed3a04c
12 changed files with 1044 additions and 272 deletions

View file

@ -21,29 +21,21 @@
}).then((res) => {
console.log(res);
if (res.ok) {
//var payment = document.getElementById('registration').value;
//window.location.href = '/mt-health-form?mtregistration=' + payment;
var payment = document.getElementById('registration').value;
window.location.href = '/mt-health-form?mtregistration=' + payment +
"&firstName=" + data.get('firstname') +
"&lastName=" + data.get('lastname') +
"&parentFirstName=" + data.get('parentfirstname') +
"&parentLastName=" + data.get('parentlastname') +
"&birthdate=" + data.get('birthdate') +
"&street=" + data.get('street') +
"&city=" + data.get('city') +
"&state=" + data.get('state') +
"&zip=" + data.get('zip') +
"&parentPhone=" + data.get('parentphone');
console.log(res);
}
});
/* var xhr = new XMLHttpRequest();
* xhr.onreadystatechange = function() {
* if (this.readyState == 4 && this.status == 200) {
* // Logic directing where to send the user after form submission based on results.
* // This is how to send them. window.location.href = '/thankyou/';
* var payment = document.getElementById('registration').value;
* window.location.href = '/mt-health-form?mtregistration=' + payment;
* // Need to eventually get the user here: https://secure.myvanco.com/L-Z772/campaign/C-13DM3
* }
* }; */
/* xhr.open("POST", "https://n8n.tfcconnection.org/webhook/mt-application"); */
/* xhr.open("POST", "https://n8n.tfcconnection.org/webhook/mt-application");
* xhr.send(data);
* console.log(data);
* console.log("Hallo!"); */
/* return false; */
}
function calculate_age(dob) {
@ -139,8 +131,8 @@
class="flex-auto form-input {{ $formClasses }}">
</div>
<div class="flex-auto flex flex-wrap items-center">
<label for="homephone" class="basis-1/4 mr-4">Parent phone</label>
<input type="tel" id="homephone" name="homephone"
<label for="parentphone" class="basis-1/4 mr-4">Parent phone</label>
<input type="tel" id="parentphone" name="parentphone"
class="flex-auto form-input {{ $formClasses }}">
</div>
<div class="basis-full flex items-center">