camp form rough draft

The camp form is basically finished. I need to have some folks look at
it to make sure we've got it all done right.
This commit is contained in:
Chris Cochrun 2023-03-22 09:40:07 -05:00
parent d3c7dc699b
commit 31bab3cf3b
4 changed files with 72 additions and 14 deletions

View file

@ -26,6 +26,6 @@ Camp Joy in Alma, NE
{{< camp-form >}} {{< camp-form >}}
## Meet the Interns! <!-- ## Meet the Interns! -->
### Cameron Hendryx <!-- ### Cameron Hendryx -->
Hello! My name is Cameron Hendryx! I am a student at Kansas State University studying personal financial planning. I am from Russell, KS, but I attended the Thunder Ridge TFC group. I cannot tell you all how excited I am for camp! I told Lavonne about 3 years ago that I would like to become a TFC summer intern, now God has allowed that to happen, and I am excited to see how he uses me in this season of life. When I was young, my favorite thing to do was to play football. I remember many times playing football with friends at the elementary school park, or on the sidelines while my dad coached. Football was definitely my favorite thing to do, and its been cool to see how God has used football in my life. In high school, all I wanted to do was to play football, but God had other plans. Each year I had to sit on the sidelines with crutches or a sling. After getting hurt again my junior year, it hit me that God wanted me to use football to grow closer to Him. While I couldnt play, God has used that love for the game to put me in a place I never imagined. Next year I will be a student coach for the K-State Football Team! The one thing that I can dwell on through this is how God has constantly provided for me and he truly does have plans to give me hope and a future! Just as God has been providing for me, I cannot wait to see where God brings you at camp this summer! <!-- Hello! My name is Cameron Hendryx! I am a student at Kansas State University studying personal financial planning. I am from Russell, KS, but I attended the Thunder Ridge TFC group. I cannot tell you all how excited I am for camp! I told Lavonne about 3 years ago that I would like to become a TFC summer intern, now God has allowed that to happen, and I am excited to see how he uses me in this season of life. When I was young, my favorite thing to do was to play football. I remember many times playing football with friends at the elementary school park, or on the sidelines while my dad coached. Football was definitely my favorite thing to do, and its been cool to see how God has used football in my life. In high school, all I wanted to do was to play football, but God had other plans. Each year I had to sit on the sidelines with crutches or a sling. After getting hurt again my junior year, it hit me that God wanted me to use football to grow closer to Him. While I couldnt play, God has used that love for the game to put me in a place I never imagined. Next year I will be a student coach for the K-State Football Team! The one thing that I can dwell on through this is how God has constantly provided for me and he truly does have plans to give me hope and a future! Just as God has been providing for me, I cannot wait to see where God brings you at camp this summer! -->

View file

@ -0,0 +1,13 @@
---
title: "Camp Health Form"
date: 2023-3-22T06:18:16-06:00
omit_header_text: true
layout: simple
sharingLinks: false
---
> You will need to fill out this health form in order to finish your camp form.
Since our health forms are only active from May to May even if you have finished the health form previously, you need to do so again in order to be eligible for camp. Keep in mind this is not due until you get to camp. If you need to wait to fill it out you may do so, but you won't be able to attend camp until it's complete.
{{< health-form >}}

View file

@ -15,16 +15,29 @@
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
// Logic directing where to send the user after form submission based on results. let payment = data.get('registration');
// This is how to send them. window.location.href = '/thankyou/'; console.log(payment);
let health = data.get('health');
console.log(health);
if (health === 'later') {
if (payment === 'now')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JPJ';
else if (payment === 'full')
window.location.href = 'https://secure.myvanco.com/L-Z772/campaign/C-13JQE';
else
window.location.href = '/thankyou/';
}
else {
if (payment === 'later')
window.location.href = '/thankyou/';
else
window.location.href = '/camp-health-form?registration=' + payment;
}
var payment = document.getElementById('registration').value;
window.location.href = '/camp-health-form?registration=' + 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.open("POST", "https://n8n.tfcconnection.org/webhook-test/camp-form"); xhr.open("POST", "https://n8n.tfcconnection.org/webhook/camp-form");
xhr.send(data); xhr.send(data);
console.log(data); console.log(data);
console.log("Hallo!"); console.log("Hallo!");
@ -112,10 +125,13 @@
<input type="radio" id="grade" name="grade" value="senior" <input type="radio" id="grade" name="grade" value="senior"
class="form-input {{ $formClasses }}"> class="form-input {{ $formClasses }}">
<label for="grade" class="">Senior</label> <label for="grade" class="">Senior</label>
<input type="radio" id="grade" name="grade" value="college-freshman"
class="form-input {{ $formClasses }}">
<label for="grade" class="">College Freshman</label>
</div> </div>
<label for="homephone" class="basis-full">Guardian's phone <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="parentphone" class="basis-full">Guardian's phone <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<input type="tel" id="homephone" name="homephone" <input type="tel" id="parentphone" name="parentphone"
class="basis-full form-input {{ $formClasses }}"> class="basis-full form-input {{ $formClasses }}">
<label for="parentemail" class="basis-full">Guardian's Email</label> <label for="parentemail" class="basis-full">Guardian's Email</label>
@ -128,13 +144,14 @@
class="basis-full form-input {{ $formClasses }}"> class="basis-full form-input {{ $formClasses }}">
<label for="week" class="basis-full">My Camp Plan <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="week" class="basis-full">My Camp Plan <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<select id="week" name="tfcgroup" class="flex-auto form-select {{ $formClasses }}"> <select id="week" name="week" class="flex-auto form-select {{ $formClasses }}">
<option value="week1">Week 1: July 17-21</option> <option value="week1">Week 1: July 17-21</option>
<option value="week2">Week 2: July 24-28</option> <option value="week2">Week 2: July 24-28</option>
</select> </select>
<label for="shirt" class="basis-full">T-Shirt Size</label> <label for="shirt" class="basis-full">T-Shirt Size</label>
<select id="shirt" name="shirt" class="flex-auto form-select {{ $formClasses }}"> <select id="shirt" name="shirt" class="flex-auto form-select {{ $formClasses }}">
<option value="ylg">Youth Large</option>
<option value="small">Small</option> <option value="small">Small</option>
<option value="medium">Medium</option> <option value="medium">Medium</option>
<option value="large">Large</option> <option value="large">Large</option>
@ -155,8 +172,25 @@
</label> </label>
</div> </div>
</div> </div>
<label for="health" class="basis-full">
Would you like to fill out the health form now or later? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span>
</label>
<div class="basis-full">
<input type="radio" value="now" id="health" name="health"
class="form-input {{ $formClasses }}" checked>
<label for="health" class="">
Now
</label>
</div>
<div class="basis-full">
<input type="radio" value="later" id="health" name="health"
class="form-input {{ $formClasses }}">
<label for="health" class="">
Later
</label>
</div>
<label for="registration" class="basis-full"> <label for="registration" class="basis-full">
Would you like to pay the registration fee now or later? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span> Would you like to pay the registration fee or the full cost now or later? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span>
</label> </label>
<div class="basis-full"> <div class="basis-full">
<input type="radio" value="now" id="registration" name="registration" <input type="radio" value="now" id="registration" name="registration"
@ -165,11 +199,18 @@
Now - $65 Now - $65
</label> </label>
</div> </div>
<div class="basis-full">
<input type="radio" value="full" id="registration" name="registration"
class="form-input {{ $formClasses }}" checked>
<label for="registration" class="">
Full Cost - $165
</label>
</div>
<div class="basis-full"> <div class="basis-full">
<input type="radio" value="later" id="registration" name="registration" <input type="radio" value="later" id="registration" name="registration"
class="form-input {{ $formClasses }}"> class="form-input {{ $formClasses }}">
<label for="registration" class=""> <label for="registration" class="">
Later - Send $65 to the TFC Office Later - Send $65 or $165 to the TFC Office
</label> </label>
</div> </div>
<div class="basis-full mt-8"> <div class="basis-full mt-8">

View file

@ -56,6 +56,10 @@
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
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')
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 else
window.location.href = '/thankyou/'; window.location.href = '/thankyou/';
} }