Beautiful Open-Source Form Builder
Fix property indexing in FormEditorPreview component for accurate field targeting during editing. Updated the method to use 'id' instead of 'nf_id' for better consistency with the data structure.
JhumanJ9c2b01df824f
diff --git a/client/components/open/forms/components/form-components/FormEditorPreview.vue b/client/components/open/forms/components/form-components/FormEditorPreview.vueindex 36d6b57ed..4a7d370aa 100644--- a/client/components/open/forms/components/form-components/FormEditorPreview.vue+++ b/client/components/open/forms/components/form-components/FormEditorPreview.vue@@ -231,7 +231,7 @@ function getAbsoluteIndexFromVisiblePage(visiblePageIndex) {const field = pageFields[0]const properties = workingFormStore.content?.properties || []- const absoluteIndex = properties.findIndex(p => p?.nf_id === field?.nf_id)+ const absoluteIndex = properties.findIndex(p => p?.id === field?.id)return absoluteIndex >= 0 ? absoluteIndex : visiblePageIndex}