Submitting this form will create an ExampleTask in the task queue. After the specified delay, the message will be logged by the queue processor.
See pkg/tasks and the README for more information.
package pages import ( "strconv" "git.grosinger.net/tgrosinger/saasitone/templ/components" "git.grosinger.net/tgrosinger/saasitone/pkg/form" "git.grosinger.net/tgrosinger/saasitone/pkg/page" ) type TaskForm struct { Delay int `form:"delay" validate:"gte=0"` Message string `form:"message" validate:"required"` form.Submission } templ Task(p page.Page, f *TaskForm) { if p.HTMX.Request.Target != "task" {
} } @taskForm(p, f) } templ taskForm(p page.Page, f *TaskForm) {