a semi working camp form

This commit is contained in:
Chris Cochrun 2024-03-21 10:22:18 -05:00
parent dc15b66627
commit c5e7e48d6d
2 changed files with 13 additions and 10 deletions

View file

@ -23,8 +23,8 @@
document.getElementById('warning-email').style.margin = '0'; document.getElementById('warning-email').style.margin = '0';
} }
let base = "http://localhost:4242/camp-form"; /* let base = "http://localhost:4242/camp-form"; */
/* let base = "https://api.tfcconnection.org/camp-form"; */ let base = "https://api.tfcconnection.org/camp-form";
fetch(base, { fetch(base, {
method: "POST", method: "POST",
@ -72,25 +72,27 @@
<label for="firstname" class="basis-full">What is your first and last name? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="firstname" class="basis-full">What is your first and last name? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<br/> <br/>
<input type="text" id="firstname" name="firstname" <input type="text" id="firstname" name="firstname"
placeholder="First Name" class="flex-1 form-input {{ $formClasses }}"> placeholder="First Name" class="flex-1 form-input {{ $formClasses }}"
required>
<input type="text" id="lastname" name="lastname" <input type="text" id="lastname" name="lastname"
placeholder="Last Name" class="flex-1 form-input {{ $formClasses }}"> placeholder="Last Name" class="flex-1 form-input {{ $formClasses }}"
required>
</div> </div>
<div class="basis-full flex flex-wrap my-4"> <div class="basis-full flex flex-wrap my-4">
<label for="parentfirstname" class="basis-full">What is your guardian's first and last name? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="parentfirstname" class="basis-full">What is your guardian's first and last name? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<input type="text" id="parentfirstname" name="parentfirstname" <input type="text" id="parentfirstname" name="parentfirstname"
class="flex-1 form-input {{ $formClasses }}" class="flex-1 form-input {{ $formClasses }}"
placeholder="First Name"> placeholder="First Name" required>
<input type="text" id="parentlastname" name="parentlastname" <input type="text" id="parentlastname" name="parentlastname"
class="flex-1 form-input {{ $formClasses }}" class="flex-1 form-input {{ $formClasses }}"
placeholder="Last Name"> placeholder="Last Name" required>
</div> </div>
<label for="birthdate" class="basis-full">When were you born? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="birthdate" class="basis-full">When were you born? <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<input type="date" id="birthdate" name="birthdate" <input type="date" id="birthdate" name="birthdate"
class="basis-full form-date {{ $formClasses }}"> class="basis-full form-date {{ $formClasses }}" required>
<label for="gender" class="basis-full">Gender <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="gender" class="basis-full">Gender <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<select id="gender" name="gender" class="basis-full form-select {{ $formClasses }}"> <select id="gender" name="gender" class="basis-full form-select {{ $formClasses }}" required>
<option value="Male">Male</option> <option value="Male">Male</option>
<option value="Female">Female</option> <option value="Female">Female</option>
</select> </select>
@ -149,7 +151,8 @@
<label for="parentphone" 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="parentphone" name="parentphone" <input type="tel" id="parentphone" name="parentphone"
class="basis-full form-input {{ $formClasses }}"> class="basis-full form-input {{ $formClasses }}"
required>
<label for="parentemail" class="basis-full">Guardian's Email <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label> <label for="parentemail" class="basis-full">Guardian's Email <span class='inline-block text-[#f39] text-sm align-sub'>* required</span></label>
<input type="parentemail" id="parentemail" name="parentemail" <input type="parentemail" id="parentemail" name="parentemail"

View file

@ -182,7 +182,7 @@ pub async fn camp_form(MultipartForm(form): MultipartForm<CampForm>) -> HttpResp
} }
} }
body { body {
h1 { @format!("Mission trip form for {} {}!", first, last) } h1 { @format!("Camp form for {} {}!", first, last) }
hr; hr;
table { table {
tr { tr {