diff --git a/docs/pattern/questionnaire-page.html b/docs/pattern/questionnaire-page.html index acf3048..5e038c6 100644 --- a/docs/pattern/questionnaire-page.html +++ b/docs/pattern/questionnaire-page.html @@ -10,10 +10,10 @@

Questionnaire Example

-
+
How old are you? -
    +
    1. @@ -50,11 +50,10 @@ id=group-age-55> 55+
    -
Gender -
    +
    1. @@ -93,18 +92,18 @@ value=other id=group-gender-other> Other
    2. - +
      - - Please specify +
    -
How many hours per day, on average, do you spend browsing the internet? -
    +
    1. @@ -138,11 +137,10 @@ value=5+-hours id=group-webbrowsing-5hours> 5+ hours
    -
What are your favorite brands? -
    +
    1. @@ -172,18 +170,25 @@ value=none id=group-brands-none> None
    2. - + +
      + +
      +
    3. +
      - - Please specify +
    -
How often do you shop online? -
    +
    1. @@ -225,11 +230,10 @@ value=never id=group-shopping-never> Never
    -
Which of the following devices do you own? -
    +
    1. @@ -270,11 +274,10 @@ value=none id=group-devices-none> None
    -
What is your preferred method of payment for online purchases? -
    +
    1. @@ -316,11 +319,10 @@ value=cryptocurrency id=group-payment-cryptocurrency> Cryptocurrency
    -
Which social media platforms do you use regularly? -
    +
    1. @@ -370,19 +372,26 @@ value=none id=group-socialmedia-none> None
    2. - + +
      + +
      +
    3. +
      - + for=group-socialmedia-pleasespecify>Please specify +
    -
How do you usually consume news? -
    +
    1. @@ -434,7 +443,6 @@ value=none id=group-newsconsumption-none> None
    -
diff --git a/docs/pattern/questionnaire.org b/docs/pattern/questionnaire.org index d6197e6..7865205 100644 --- a/docs/pattern/questionnaire.org +++ b/docs/pattern/questionnaire.org @@ -1,7 +1,7 @@ #+title: Creating a Questionnaire using dev.metalisp.sbt/component/questionnaire Macros in a Web Application #+author: Marcus Kammer #+email: marcus.kammer@mailbox.org -#+date: [2024-04-17 09:36] +#+date: [2024-04-21 18:55] * Introduction Questionnaires are powerful tools for gathering information and insights from @@ -39,7 +39,7 @@ required for different types of questions in a questionnaire. (defpackage my-web-questionnaire-app (:use :cl) (:import-from :dev.metalisp.sbt :with-page) - (:import-from :dev.metalisp.sbt/pattern/questionnaire :questionnaire) + (:import-from :dev.metalisp.sbt/questionnaire :questionnaire) (:export :generate-questionnaire-page)) #+end_src @@ -54,14 +54,14 @@ required for different types of questions in a questionnaire. "Generates an HTML page with questionnaires using questionnaire macros." (with-output-to-string (spinneret:*html*) (with-page (:title "Questionnaire Example" :main-con t) - (questionnaire "/submit" + (questionnaire "#" "none" (: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")) + :choices (:radio "Male" "Female" "Non-binary" "Prefer not to say" "Other" :text "Please specify")) (:ask "How many hours per day, on average, do you spend browsing the internet?" :group "webbrowsing" @@ -69,7 +69,7 @@ required for different types of questions in a questionnaire. (:ask "What are your favorite brands?" :group "brands" - :choices (:checkbox "Brand A" "Brand B" "Brand C" "None" :text "Other")) + :choices (:checkbox "Brand A" "Brand B" "Brand C" "None" "Other" :text "Please specify")) (:ask "How often do you shop online?" :group "shopping" @@ -85,7 +85,7 @@ required for different types of questions in a questionnaire. (:ask "Which social media platforms do you use regularly?" :group "socialmedia" - :choices (:checkbox "Facebook" "Twitter" "Instagram" "LinkedIn" "TikTok" "None" :text "Other")) + :choices (:checkbox "Facebook" "Twitter" "Instagram" "LinkedIn" "TikTok" "None" "Other" :text "Please specify")) (:ask "How do you usually consume news?" :group "newsconsumption"