Let’s say I have a multi-step sign up form, user will have to put in their name, and then on the next step their email.
I want to make the input reusable, so I’ll have an array like this
formFields = ['name', 'email']
and an index to identity which step I’m currently at
index = 0
On the view, it’ll be something like
<input v-model="formFields[index]" />
and a next button to update the index.
However, it’s not working. This is my codepen link , in the form, it will just show the ‘name’ text and changing it doesn’t trigger anything.
How can I get it working?