+
{{ error.$message }}
diff --git a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue
index ae9e84c36a..ba9a7ebf4d 100644
--- a/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue
+++ b/packages/nc-gui/pages/[projectType]/form/[viewId]/index/survey.vue
@@ -35,7 +35,7 @@ const steps = computed(() => {
}, [] as string[])
})
-const { index, goToPrevious, goToNext, isFirst, isLast, steps: _steps } = useStepper(steps)
+const { index, goToPrevious, goToNext, isFirst, isLast } = useStepper(steps)
const isTransitioning = ref(false)
@@ -63,8 +63,14 @@ const transition = (direction: 'left' | 'right') => {
const goNext = async () => {
if (isLast.value) return
- const isValid = await v$.value.localState[field.value!.title!].$validate()
- if (!isValid) return
+ if (!field.value || !field.value.title) return
+
+ const validationField = v$.value.localState[field.value.title]
+
+ if (validationField) {
+ const isValid = await validationField.$validate()
+ if (!isValid) return
+ }
transition('left')
@@ -99,13 +105,15 @@ onKeyStroke(['ArrowRight', 'ArrowUp', 'Enter', 'Space'], goNext)
-
+
{{ sharedFormView.heading }}
- {{ sharedFormView.subheading }}
+
+ {{ sharedFormView.subheading }}
+
@@ -149,7 +157,7 @@ onKeyStroke(['ArrowRight', 'ArrowUp', 'Enter', 'Space'], goNext)
/>