From 8b9b38ef48704fcb9e0f638624252bb72acdbc30 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 24 Dec 2023 23:26:37 +0100 Subject: [PATCH] Add Radio field --- index.html | 1 + src/Eventform.ce.vue | 63 ++++++++++++++++++--------------- src/components/FieldLabel.vue | 6 +++- src/components/fields/Radio.vue | 44 +++++++++++++++++++++++ 4 files changed, 85 insertions(+), 29 deletions(-) create mode 100644 src/components/fields/Radio.vue diff --git a/index.html b/index.html index 9621db1..8c06d9e 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ {"name": "Personal", "intro": "Jaöaöd", "fields": [ {"name": "Vorname", "type": "text", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true}, {"name": "Geschlecht", "type": "select", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": null, "required": true, "options": ["A","Bb","Cc"]}, + {"name": "Essgewohnheiten", "type": "radio", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": null, "required": true, "options": ["A","Bb","Cc"]}, {"name": "Nachname", "type": "text", "columns": {"mobile": 2, "tablet": 3, "desktop": 6}, "default": "", "required": true} ]}, {"name": "Veranstaltung", "intro": "Jaöaöd", "fields": [ diff --git a/src/Eventform.ce.vue b/src/Eventform.ce.vue index 2760c99..8a61742 100644 --- a/src/Eventform.ce.vue +++ b/src/Eventform.ce.vue @@ -4,48 +4,56 @@
- + :class="{'opacity-40': !backable}" + > - +
-
- +
+
- + :class="{'opacity-40': !nextable}" + > @@ -56,12 +64,9 @@
-
-
+
- +
@@ -75,13 +80,14 @@ diff --git a/src/components/fields/Radio.vue b/src/components/fields/Radio.vue new file mode 100644 index 0000000..91a93ae --- /dev/null +++ b/src/components/fields/Radio.vue @@ -0,0 +1,44 @@ + + +