Skip to content

Beautiful Open-Source Form Builder

Fix forms

Julien Nahum735f398605b7
diff --git a/client/components/open/forms/OpenCompleteForm.vue b/client/components/open/forms/OpenCompleteForm.vue
index 2a8fd8f23..d8f87d684 100644
--- a/client/components/open/forms/OpenCompleteForm.vue
+++ b/client/components/open/forms/OpenCompleteForm.vue
@@ -117,14 +117,14 @@
:admin-preview="adminPreview"
@submit="submitForm"
>
- <template #submit-btn="{rootSubmitForm}">
+ <template #submit-btn="{submitForm: handleSubmit}">
<open-form-button
:loading="loading"
:theme="theme"
:color="form.color"
class="mt-2 px-8 mx-1"
:class="submitButtonClass"
- @click.prevent="rootSubmitForm"
+ @click.prevent="handleSubmit"
>
{{ form.submit_button_text }}
</open-form-button>
diff --git a/client/components/open/forms/OpenForm.vue b/client/components/open/forms/OpenForm.vue
index 30caa001a..29121ed7f 100644
--- a/client/components/open/forms/OpenForm.vue
+++ b/client/components/open/forms/OpenForm.vue
@@ -347,7 +347,11 @@ export default {
this.initForm()
},
mounted() {
- this.$refs['form-timer'].startTimer()
+ nextTick(() => {
+ if (this.$refs['form-timer']) {
+ this.$refs['form-timer'].startTimer()
+ }
+ })
if (import.meta.client && window.location.href.includes('auto_submit=true')) {
this.isAutoSubmit = true
this.submitForm()