Our Wedding Site
git clone git://
Log | Files | Refs | README | LICENSE

commit c712cabb72dbf53844f61ff31dadde617b18e644 (patch)
parent adc40b8a76dcd486649bc59000d7e2619464557b
Author: Alex Karle <>
Date:   Mon, 14 Nov 2022 14:48:54 -0500

rsvp: Update success page edit link to go to form

There's a bit of a hack here where if the second person in the party
hits the edit link, it might have the first person's name, but hopefully
people won't mind / notice.

Also this breaks the "maybe we should make the edit page a POST request
so that it's not linkable" TODO... but that's an issue for later.

Msrc/handler.scm | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/handler.scm b/src/handler.scm @@ -139,12 +139,15 @@ (begin ;; This will raise if update-guest fails (so we get an error page) (map update-guest (map cdr guests)) - (send-sxml - (template-page - `((h2 "RSVP") - (p "Success! Thanks for RSVP-ing.") - (p (a (@ (href "/")) "Edit your response")) - (p (a (@ (href "")) "Read more about the event")))))) + (let* ((first-guest (cdadr guests)) + (first-name (guest-name first-guest)) + (edit-link (conc "/rsvp?rsvp-name=" (uri-encode-string first-name)))) + (send-sxml + (template-page + `((h2 "RSVP") + (p "Success! Thanks for RSVP-ing.") + (p (a (@ (href ,edit-link))) "Edit your response") + (p (a (@ (href "")) "Read more about the event"))))))) (let* ((input (car fdata)) (name (car input)) (value (cdr input))