How do I submit a form?

I have a long form with many inputs (some of them generated dinamically) and I would like to pass all these values at once to a function. How could I do it?

Thank you in advance.

For long forms, I add all v-model variables to one object called form and on v-model. This allows me to get all the values at once when I submit the form.

          <ion-input v-model=""></ion-input>
          <ion-input v-model="form.password" type="password"></ion-input>
data() {
	return {
		form: {
			email: null
			password: null
methods: {
	submit() {
		authStore.dispatch("login", this.form)
		.then(() => {})
		.catch(error => {});
1 Like

Thank you, I think that will work.