Add form macro

This commit is contained in:
Marcus Kammer 2024-04-19 20:20:57 +02:00
parent bf8cb826bb
commit 4cddc06554
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -63,6 +63,15 @@
(in-package :dev.metalisp.sbt/component/form)
;;; form
(defmacro form ((&optional (attr nil)) &body body)
`(spinneret:with-html
(:form ,@(if (listp attr)
attr
(list :action "" :name "html-form" :method "post"))
(:fieldset ,@body))))
;;; checkable
(defvar checkable-elements