commit abe58a545392fa06b054ec12789ecd183c477bc7 (patch)
parent bbec2b171c5f5bb2b47c9c64146ed8b917c920d6
Author: Alex Karle <alex@alexkarle.com>
Date: Mon, 14 Nov 2022 20:46:13 -0500
rsvp: Allow updating the guest names in a party
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/handler.scm b/src/handler.scm
@@ -64,8 +64,10 @@
("meal-choice" . ,guest-meal-choice)))
(define (guest-to-form g)
+ (define (input-name key)
+ `(name ,(conc (number->string (guest-id g)) "__" key)))
(define (get-attrs key val)
- `((name ,(conc (number->string (guest-id g)) "__" key))
+ `(,(input-name key)
(value ,val)
(type "radio")
(required "true")
@@ -76,6 +78,8 @@
;; TODO: add notes section for allergies, etc
`((div (@ (class "guest"))
(h4 ,(guest-name g))
+ (label "Name: "
+ (input (@ ,(input-name "name") (required "true") (value ,(guest-name g)))))
(fieldset
(legend "Will You be Attending?")
(label (input (@ ,@(get-attrs "going" 1))) "Yes!")