package pages import ( "git.grosinger.net/tgrosinger/saasitone/templ/components" "git.grosinger.net/tgrosinger/saasitone/pkg/form" "git.grosinger.net/tgrosinger/saasitone/pkg/page" ) type ContactForm struct { Email string `form:"email" validate:"required,email"` Department string `form:"department" validate:"required,oneof=sales marketing hr"` Message string `form:"message" validate:"required"` form.Submission } templ Contact(p page.Page, f *ContactForm) { if p.HTMX.Request.Target != "contact" { } if f.IsDone() {

Thank you!

No email was actually sent but this entire operation was handled server-side and degrades without JavaScript enabled.
} else {
@components.FieldErrors(f.Submission.GetFieldErrors("Email"))
@components.FieldErrors(f.Submission.GetFieldErrors("Department"))
@components.FieldErrors(f.Submission.GetFieldErrors("Message"))
@components.CSRF(p.CSRF)
} }