Submit form programmatically #3749
-
Hello, i am using veeValidade, until now when i wanted to submit a form i had a button type="submit" to submit the form, but now i want to programmatically submit how i can archive this? I have try form.value.submit() but it shows form.value.submit is not a function. But no submit or anything similar. i am using setup syntax in vuejs 3 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Well i have figured out how to handle, the solution i have use : https://vee-validate.logaretm.com/v4/guide/components/handling-forms#form-values My goal was when an input had more than 6 charcters (token) was submit the form i have done something like this:
Than the handleForm handles and sends the values of the form. |
Beta Was this translation helpful? Give feedback.
-
You should use: |
Beta Was this translation helpful? Give feedback.
Well i have figured out how to handle, the solution i have use : https://vee-validate.logaretm.com/v4/guide/components/handling-forms#form-values
My goal was when an input had more than 6 charcters (token) was submit the form i have done something like this:
<Form v-slot="{values}" >
<Field v-model="myfield" v-on:input="myfield.lenght === 6 ? handleForm(values) : null" />
</Form>
Than the handleForm handles and sends the values of the form.