diff --git a/src/documentation/components/examples/ButtonsFieldExample.vue b/src/documentation/components/examples/ButtonsFieldExample.vue
index 8ea8910..dc7af0a 100644
--- a/src/documentation/components/examples/ButtonsFieldExample.vue
+++ b/src/documentation/components/examples/ButtonsFieldExample.vue
@@ -276,8 +276,8 @@ const pages = computed(() => [
{
fields: [
{
- align: buttonAlignModel,
- block: buttonBlock,
+ align: buttonAlignModel.value,
+ block: buttonBlock.value,
label: 'I like buttons',
name: 'iLikeButtons',
options: [
@@ -309,8 +309,8 @@ const pages = computed(() => [
type: 'buttons' as const,
},
{
- align: buttonAlignModel,
- block: buttonBlock,
+ align: buttonAlignModel.value,
+ block: buttonBlock.value,
label: 'I like...',
multiple: true,
name: 'animalsILike',
diff --git a/src/documentation/components/examples/DynamicAnswersQuestionsExample.vue b/src/documentation/components/examples/DynamicAnswersQuestionsExample.vue
new file mode 100644
index 0000000..7174425
--- /dev/null
+++ b/src/documentation/components/examples/DynamicAnswersQuestionsExample.vue
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+`
+));
+
+const exampleCode = computed(() => ({
+ desc: 'This example showcases how to build a form with dynamic questions and responses. When you enter "foo" or "bar" in the name field, the select field updates automatically.
To ensure the "slug" value updates correctly, use a setTimeout function within the watcher to modify its value after the name field changes.',
+ name: 'Dynamic Answers and Questions',
+ script: scriptCode.value,
+ template: templateCode.value,
+}));
+
+defineExpose({
+ exampleCode: exampleCode.value,
+});
+
+
+
+
diff --git a/src/documentation/components/examples/index.ts b/src/documentation/components/examples/index.ts
index 5b43be7..2c5a937 100644
--- a/src/documentation/components/examples/index.ts
+++ b/src/documentation/components/examples/index.ts
@@ -2,6 +2,7 @@ import ButtonsFieldExample from './ButtonsFieldExample.vue';
import ColumnsExample from './ColumnsExample.vue';
import ConditionalFieldExample from './ConditionalFieldExample.vue';
import ConditionalPageExample from './ConditionalPageExample.vue';
+import DynamicAnswersQuestionsExample from './DynamicAnswersQuestionsExample.vue';
import FieldSlotExample from './FieldSlotExample.vue';
import SimpleExample from './SimpleExample.vue';
import SummaryPageExample from './SummaryPageExample.vue';
@@ -14,6 +15,7 @@ export {
ColumnsExample,
ConditionalFieldExample,
ConditionalPageExample,
+ DynamicAnswersQuestionsExample,
FieldSlotExample,
SimpleExample,
SummaryPageExample,
diff --git a/src/documentation/sections/ExampleSection.vue b/src/documentation/sections/ExampleSection.vue
index 03b0180..0e2fb22 100755
--- a/src/documentation/sections/ExampleSection.vue
+++ b/src/documentation/sections/ExampleSection.vue
@@ -13,7 +13,6 @@
-
+
+
+
+
@@ -136,6 +146,7 @@ const ConditionalFieldExampleRef = ref(null);
const ConditionalPageExampleRef = ref(null);
const SummaryPageExampleRef = ref(null);
const TooltipExampleRef = ref(null);
+const DynamicAnswersQuestionsExampleRef = ref(null);
const ButtonsFieldExampleRef = ref(null);
const ButtonsFieldExampleCode = ref();
@@ -145,6 +156,7 @@ const refElements = ref({
ColumnsExampleRef,
ConditionalFieldExampleRef,
ConditionalPageExampleRef,
+ DynamicAnswersQuestionsExampleRef,
FieldSlotExampleRef,
SimpleExampleRef,
SummaryPageExampleRef,
@@ -157,6 +169,7 @@ const refElementsOpen = ref({
ColumnsExampleRef: null,
ConditionalFieldExampleRef: null,
ConditionalPageExampleRef: null,
+ DynamicAnswersQuestionsExampleRef: null,
FieldSlotExampleRef: null,
SimpleExampleRef: null,
SummaryPageExampleRef: null,
diff --git a/src/playground/configs/templates/PlaygroundPageDynamic.vue b/src/playground/configs/templates/PlaygroundPageDynamic.vue
new file mode 100644
index 0000000..1ed767e
--- /dev/null
+++ b/src/playground/configs/templates/PlaygroundPageDynamic.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+