diff --git a/docs/pattern/questionnaire-page.html b/docs/pattern/questionnaire-page.html
new file mode 100644
index 0000000..3256140
--- /dev/null
+++ b/docs/pattern/questionnaire-page.html
@@ -0,0 +1,145 @@
+
+
+
+ Questionnaire Examples
+
+
+
+ Questionnaire Examples
+
+
+
+
\ No newline at end of file
diff --git a/docs/pattern/questionnaire.org b/docs/pattern/questionnaire.org
index cb5ec3f..199db6e 100644
--- a/docs/pattern/questionnaire.org
+++ b/docs/pattern/questionnaire.org
@@ -1,7 +1,7 @@
#+title: Creating a Questionnaire using cl-sbt/questionnaire Macros in a Web Application
#+author: Marcus Kammer
#+email: marcus.kammer@mailbox.org
-#+date: 2023-11-09T16:17+01:00
+#+date: 2023-11-09T16:51+01:00
* Introduction
Questionnaires are powerful tools for gathering information and insights from
@@ -29,38 +29,39 @@ cl-sbt/questionnaire macros can be employed. These macros generate the HTML
required for different types of questions in a questionnaire.
#+name: questionnaire-page
-#+begin_src lisp :results value file :file-ext html
+#+begin_src lisp :results output file :file-ext html
(defpackage my-web-app
- (:use :cl :cl-sbt/questionnaire)
- (:export :generate-button-page))
+ (:use :cl :cl-sbt/questionnaire)
+ (:export :generate-button-page))
(in-package :my-web-app)
(defun generate-questionnaire-page ()
- "Generates an HTML page with questionnaires using cl-sbt/questionnaire macros."
- (spinneret:with-html-string
- (:html
- (:head
- (:title "Questionnaire Examples")
- (:link :type "text/css" :rel "stylesheet" :href "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css")
- ;; Include Bootstrap CSS and JavaScript links here
- )
- (:body
- (:h1 "Questionnaire Examples")
- (questionnaire "/submit"
- (:ask "How old are you?"
- :group "age"
- :choices (:radio "18-24" "25-34" "35-44" "45-54" "55+"))
- (:ask "Gender"
- :group "gender"
- :choices (:radio "Male" "Female" "Non-binary" "Prefer not to say" :text "Other"))
- (:ask "How many hours per day, on average, do you spend browsing the internet?"
- :group "webbrowsing"
- :choices (:radio "Less than 1 hour" "1-3 hours" "3-5 hours" "5+ hours")))
- (:script :src "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js")
- ))))
+ "Generates an HTML page with questionnaires using cl-sbt/questionnaire macros."
+ (spinneret:with-html-string
+ (:html
+ (:head
+ (:title "Questionnaire Examples")
+ (:link :type "text/css"
+ :rel "stylesheet"
+ :href "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"))
+ (:body
+ (:h1 "Questionnaire Examples")
+ ;; ---
+ (questionnaire "/submit"
+ (:ask "How old are you?"
+ :group "age"
+ :choices (:radio "18-24" "25-34" "35-44" "45-54" "55+"))
+ (:ask "Gender"
+ :group "gender"
+ :choices (:radio "Male" "Female" "Non-binary" "Prefer not to say" "Other" :text "Other"))
+ (:ask "How many hours per day, on average, do you spend browsing the internet?"
+ :group "webbrowsing"
+ :choices (:radio "Less than 1 hour" "1-3 hours" "3-5 hours" "5+ hours")))
+ ;; ---
+ (:script :src "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js")))))
- (generate-questionnaire-page)
+ (format t (generate-questionnaire-page))
#+end_src
#+RESULTS: questionnaire-page