I have a bit of code that creates a dynamic input and select:
<div v-for="(index) in rows">
<select>
<option selected="true" disabled>Select Type</option>
<option>Name</option>
<option>Address</option>
<option>Email</option>
<option>Phone</option>
<option>Medical</option>
<option>Tax File Number</option>
<option>Card Number</option>
<option>Financial Card</option>
<option>Medical Card</option>
<option>Social Card</option>
</select>
<input type="text" list="predictive_data" class="uk-input">
</div>
<button v-on:click="addRow" type="button">Add Input</button>
This works great, but my issue is that I would like to somehow group the inputs. If there are multiple names and multiple emails, when it gets sent to my Flask backend, I can see whose data is whose.
Currently, if I were to add 3 names and 1 email, it arrives at my backend like this:
Name:['John Smith', 'Jane Doe', 'Bob Alan'], Email:[coolkid69@email.com]
As you can see, I can't tell who owns the email. I'd prefer it like this:
{Name:'John Smith'}, {Name:'Jane Doe', Email:'coolkid69@email.com'}, {Name:'Bob Alan'}