Beautiful Open-Source Form Builder
Fix password form (#917)
Chirag Chhatralaa8d8d0ad14bb
diff --git a/client/components/open/forms/OpenForm.vue b/client/components/open/forms/OpenForm.vueindex 9a138a740..ac7f7a3d0 100644--- a/client/components/open/forms/OpenForm.vue+++ b/client/components/open/forms/OpenForm.vue@@ -93,7 +93,7 @@<CaptchaWrapper v-if="form.use_captcha" :form-manager="formManager" /><!-- Submit, Next and previous buttons -->- <div v-if="!isSubmitted" class="flex flex-wrap justify-center w-full">+ <div v-if="!form?.is_password_protected && !isSubmitted" class="flex flex-wrap justify-center w-full"><open-form-buttonv-if="formPageIndex>0 && previousFieldsPageBreak"native-type="button"diff --git a/client/pages/forms/[slug]/index.vue b/client/pages/forms/[slug]/index.vueindex 4172fd524..594266835 100644--- a/client/pages/forms/[slug]/index.vue+++ b/client/pages/forms/[slug]/index.vue@@ -73,7 +73,14 @@ const passwordEntered = function (password) {refetchForm().then(() => {console.log('form.value', form.value)if (form.value?.is_password_protected) {- openCompleteForm.value.addPasswordError(t('forms.invalid_password'))+ // Add another nextTick to ensure the component is fully rendered after refetch+ nextTick(() => {+ if (openCompleteForm.value && typeof openCompleteForm.value.addPasswordError === 'function') {+ openCompleteForm.value.addPasswordError(t('forms.invalid_password'))+ } else {+ console.warn('OpenCompleteForm ref not available or addPasswordError method not found')+ }+ })} else {trackFormView()}