some attempts at fixing the nil forms
This commit is contained in:
		
							parent
							
								
									e35c29d189
								
							
						
					
					
						commit
						5b988b14ae
					
				
					 2 changed files with 38 additions and 37 deletions
				
			
		| 
						 | 
					@ -225,26 +225,26 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <h3 class="basis-full">2024-2025 Health Form</h3>
 | 
					        <h3 class="basis-full">2024-2025 Health Form</h3>
 | 
				
			||||||
        <div class="basis-full flex flex-wrap my-4">
 | 
					        <div class="basis-full flex flex-wrap my-4">
 | 
				
			||||||
            <label for="firstname" class="basis-full">What is your first and last name? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
					            <label for="first-name" class="basis-full">What is your first and last name? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
				
			||||||
            <br/>
 | 
					            <br/>
 | 
				
			||||||
            <input type="text" id="firstname" name="firstname" required
 | 
					            <input type="text" id="first-name" name="first-name" required
 | 
				
			||||||
                   placeholder="First Name" class="flex-1 form-input {{ $formClasses }}">
 | 
					                   placeholder="First Name" class="flex-1 form-input {{ $formClasses }}">
 | 
				
			||||||
            <input type="text" id="lastname" name="lastname" required
 | 
					            <input type="text" id="last-name" name="last-name" required
 | 
				
			||||||
                   placeholder="Last Name" class="flex-1 form-input {{ $formClasses }}">
 | 
					                   placeholder="Last Name" class="flex-1 form-input {{ $formClasses }}">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="basis-full my-8">
 | 
					        <div class="basis-full my-8">
 | 
				
			||||||
            <div class="">
 | 
					            <div class="">
 | 
				
			||||||
                <label for="birthdate" class="">When were you born? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
					                <label for="birth-date" class="">When were you born? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
				
			||||||
                <input type="date" id="birthdate" name="birthdate"
 | 
					                <input type="date" id="birth-date" name="birth-date"
 | 
				
			||||||
                       class="form-date {{ $formClasses }}" required>
 | 
					                       class="form-date {{ $formClasses }}" required>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </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 parent's first and last name? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
					            <label for="parent-first-name" class="basis-full">What is your parent's first and last name? <span class='inline-block text-[#f39] text-sm'>* required</span></label>
 | 
				
			||||||
            <input type="text" id="parentfirstname" name="parentfirstname"
 | 
					            <input type="text" id="parent-first-name" name="parent-first-name"
 | 
				
			||||||
                   class="flex-1 form-input {{ $formClasses }}"
 | 
					                   class="flex-1 form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="First Name" required>
 | 
					                   placeholder="First Name" required>
 | 
				
			||||||
            <input type="text" id="parentlastname" name="parentlastname"
 | 
					            <input type="text" id="parent-last-name" name="parent-last-name"
 | 
				
			||||||
                   class="flex-1 form-input {{ $formClasses }}"
 | 
					                   class="flex-1 form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Last Name" required>
 | 
					                   placeholder="Last Name" required>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
| 
						 | 
					@ -265,36 +265,37 @@
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="basis-full flex flex-wrap items-center my-8">
 | 
					        <div class="basis-full flex flex-wrap items-center my-8">
 | 
				
			||||||
            <div class="flex-auto flex flex-wrap items-center">
 | 
					            <div class="flex-auto flex flex-wrap items-center">
 | 
				
			||||||
                <label for="cellphone" class="mr-4">Parent Cell phone</label>
 | 
					                <label for="cell-phone" class="mr-4">Parent Cell phone</label>
 | 
				
			||||||
                <input type="tel" id="cellphone" name="cellphone"
 | 
					                <input type="tel" id="cell-phone" name="cell-phone"
 | 
				
			||||||
                       class="flex-auto form-input {{ $formClasses }}">
 | 
					                       class="flex-auto form-input {{ $formClasses }}">
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="flex-auto flex flex-wrap items-center">
 | 
					            <div class="flex-auto flex flex-wrap items-center">
 | 
				
			||||||
                <label for="homephone" class="mr-4">Home phone</label>
 | 
					                <label for="home-phone" class="mr-4">Home phone</label>
 | 
				
			||||||
                <input type="tel" id="homephone" name="homephone"
 | 
					                <input type="tel" id="home-phone" name="home-phone"
 | 
				
			||||||
                       class="flex-auto form-input {{ $formClasses }}">
 | 
					                       class="flex-auto form-input {{ $formClasses }}">
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="basis-full flex flex-wrap my-4">
 | 
					        <div class="basis-full flex flex-wrap my-4">
 | 
				
			||||||
            <label for="add-emergency-contact" class="basis-full">Additional Emergency Contact</label>
 | 
					            <label for="additional-emergency-contact" class="basis-full">Additional Emergency Contact</label>
 | 
				
			||||||
            <input type="text" id="add-emergency-contact" name="add-emergency-contact"
 | 
					            <input type="text" id="additional-emergency-contact"
 | 
				
			||||||
 | 
					                   name="additional-emergency-contact"
 | 
				
			||||||
                   class="flex-auto form-input {{ $formClasses }}"
 | 
					                   class="flex-auto form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Full Name">
 | 
					                   placeholder="Full Name">
 | 
				
			||||||
            <input type="tel" id="add-emergency-contact-phone"
 | 
					            <input type="tel" id="additional-emergency-contact-phone"
 | 
				
			||||||
                   name="add-emergency-contact-phone"
 | 
					                   name="additional-emergency-contact-phone"
 | 
				
			||||||
                   class="flex-auto form-input {{ $formClasses }}"
 | 
					                   class="flex-auto form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Phone Number">
 | 
					                   placeholder="Phone Number">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="basis-full flex flex-wrap my-4">
 | 
					        <div class="basis-full flex flex-wrap my-4">
 | 
				
			||||||
            <label for="doctor" class="basis-full">Doctor</label>
 | 
					            <label for="doctor-name" class="basis-full">Doctor</label>
 | 
				
			||||||
            <input type="text" id="doctorname" name="doctorname"
 | 
					            <input type="text" id="doctor-name" name="doctor-name"
 | 
				
			||||||
                   class="flex-auto form-input {{ $formClasses }}"
 | 
					                   class="flex-auto form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Doctor's Name">
 | 
					                   placeholder="Doctor's Name">
 | 
				
			||||||
            <input type="text" id="doctorcity" name="doctorcity"
 | 
					            <input type="text" id="doctor-city" name="doctor-city"
 | 
				
			||||||
                   class="flex-auto form-input {{ $formClasses }}"
 | 
					                   class="flex-auto form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Doctor's City">
 | 
					                   placeholder="Doctor's City">
 | 
				
			||||||
            <input type="tel" id="doctorphone"
 | 
					            <input type="tel" id="doctor-phone"
 | 
				
			||||||
                   name="doctorphone"
 | 
					                   name="doctor-phone"
 | 
				
			||||||
                   class="flex-auto form-input {{ $formClasses }}"
 | 
					                   class="flex-auto form-input {{ $formClasses }}"
 | 
				
			||||||
                   placeholder="Phone Number">
 | 
					                   placeholder="Phone Number">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -374,7 +374,6 @@ with the image attached"
 | 
				
			||||||
         (attachment nil))
 | 
					         (attachment nil))
 | 
				
			||||||
    (loop :for d :in data
 | 
					    (loop :for d :in data
 | 
				
			||||||
          :do (progn
 | 
					          :do (progn
 | 
				
			||||||
                (uiop:println d)
 | 
					 | 
				
			||||||
                (if (string= "first-name" (car d))
 | 
					                (if (string= "first-name" (car d))
 | 
				
			||||||
                    (progn
 | 
					                    (progn
 | 
				
			||||||
                      (setf first-name (cdr d))))
 | 
					                      (setf first-name (cdr d))))
 | 
				
			||||||
| 
						 | 
					@ -397,21 +396,22 @@ with the image attached"
 | 
				
			||||||
                      (setf attachment path)
 | 
					                      (setf attachment path)
 | 
				
			||||||
                      (log:info attachment)))))
 | 
					                      (log:info attachment)))))
 | 
				
			||||||
    (log:info data)
 | 
					    (log:info data)
 | 
				
			||||||
    (mail-health-form data attachment)
 | 
					    (when data
 | 
				
			||||||
    (cond ((string= registration "now")
 | 
					      (mail-health-form data attachment)
 | 
				
			||||||
           (setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ"))
 | 
					      (cond ((string= registration "now")
 | 
				
			||||||
          ((string= registration "full")
 | 
					             (setf (hunchentoot:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JPJ"))
 | 
				
			||||||
           (setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE"))
 | 
					            ((string= registration "full")
 | 
				
			||||||
          ((string= registration "later")
 | 
					             (setf (tbnl:header-out :HX-Redirect) "https://secure.myvanco.com/L-Z772/campaign/C-13JQE"))
 | 
				
			||||||
           (with-html-string
 | 
					            ((string= registration "later")
 | 
				
			||||||
             (:div
 | 
					             (with-html-string
 | 
				
			||||||
              :class "mt-8"
 | 
					               (:div
 | 
				
			||||||
              (:h2 (format nil
 | 
					                :class "mt-8"
 | 
				
			||||||
                           "Thank You ~A!"
 | 
					                (:h2 (format nil
 | 
				
			||||||
                           (concat
 | 
					                             "Thank You ~A!"
 | 
				
			||||||
                            first-name " " last-name)))
 | 
					                             (concat
 | 
				
			||||||
              (:p :class "text-md"
 | 
					                              first-name " " last-name)))
 | 
				
			||||||
                  "If you'd like to pay for your registration go to the donate tab in the top right when you are ready and find the camp registration option.")))))))
 | 
					                (:p :class "text-md"
 | 
				
			||||||
 | 
					                    "If you'd like to pay for your registration go to the donate tab in the top right when you are ready and find the camp registration option."))))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(hunchentoot:define-easy-handler (camp-form :uri "/camp-form") ()
 | 
					(hunchentoot:define-easy-handler (camp-form :uri "/camp-form") ()
 | 
				
			||||||
  (let* ((request-type (hunchentoot:request-method hunchentoot:*request*))
 | 
					  (let* ((request-type (hunchentoot:request-method hunchentoot:*request*))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue