Fix forms

This commit is contained in:
Julien Nahum 2025-01-28 09:23:11 +01:00
parent c49af07aa1
commit 735f398605
2 changed files with 7 additions and 3 deletions

View File

@ -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>

View File

@ -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()