From 06b022c7f7d120df78a883945ac7dd4b89992453 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Mon, 22 Apr 2024 22:19:15 +0200 Subject: [PATCH] Move position of function --- src/form.lisp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/form.lisp b/src/form.lisp index 2f8345f..2f37c5b 100644 --- a/src/form.lisp +++ b/src/form.lisp @@ -402,21 +402,6 @@ Returns: ;; Return the reversed result list (nreverse result))) -(defun resolve-input-type (type) - "Resolve the given input TYPE keyword to the corresponding HTML input type. - -The function maps specific keywords to HTML input types. For example, it maps -\"single\" to \"radio\" and \"multiple\" to \"checkbox\". If the input TYPE -does not match these special cases, it is returned as-is. - -TYPE: The input type keyword to resolve. - -Returns: - The corresponding HTML input type string." - (cond ((string= type "single") "radio") - ((string= type "multiple") "checkbox") - (t type))) - (declaim (ftype (function (choice) (values string list)) resolve-input-and-choice)) (defun resolve-input-and-choice (choice) "Separate the input-type keyword from the remaining CHOICE in a list. @@ -463,6 +448,21 @@ Returns: (ctrl-element #'ctrl) (otherwise (error "Unknown type ~A" type)))) +(defun resolve-input-type (type) + "Resolve the given input TYPE keyword to the corresponding HTML input type. + +The function maps specific keywords to HTML input types. For example, it maps +\"single\" to \"radio\" and \"multiple\" to \"checkbox\". If the input TYPE +does not match these special cases, it is returned as-is. + +TYPE: The input type keyword to resolve. + +Returns: + The corresponding HTML input type string." + (cond ((string= type "single") "radio") + ((string= type "multiple") "checkbox") + (t type))) + (defmacro form (action &optional list-style-type &body body) "This macro generates an HTML form composed of multiple questions.