I'm currently exploring VUE JS and trying to figure out how to redirect to another vue or page after submitting a form. I've been working with the sample code provided at https://stackblitz.com/edit/vue3-form-wizard-demo?file=src%2FApp.vue.
While I have successfully configured the form, I'm in need of some guidance or examples on how to redirect to another vue or page once a response is received.
<template>
<h1>Vue 3 Form Wizard Demo</h1>
<vue-form-wizard :form="wizardQuestions" v-model="formData" @submit="handleForm(formData)" />
</template>
<script>
import VueFormWizard from 'https://unpkg.com/@anivive/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e0979494d0ce859c818ed0849b9dcda2bdcb">[email protected]</a>/dist/index.umd.js';
import './index.css';
import wizardQuestions from './wizardQuestions.json';
export default {
name: "App",
components: {
VueFormWizard
},
methods: {
handleForm(data) {
console.log(data);
}
},
data() {
return {
formData: [],
wizardQuestions: wizardQuestions
};
}
};
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
When attempting this.router.push, I encountered an undefined error.