Q: How can I update autocomplete/autofill when submitting form using custom javascript function? I've created a Vue app with a form. When the user clicks on submit the submit is handled by a JavaScript function that sends an ajax request (using Axios). The data sent is a custom JSON object I've created from combining the data from the input fields. I've created some dummy code below just to show the idea:
<form method="post" v-on:submit.prevent>
    <input name="emailAddress" v-model="emailAddress" autocomplete="email"/>
    <button type="submit" v-on:click="submit()">Submit</button>
</form>

submit: function(){
    var jsonObject = {testValue : this.emailAddress +"123"};
    axios.post(MY_URL, jsonObject)
        .then(response => {
            ...
        })
        .catch(error => {
            ....
        })
}

After submitting once and reloading the page I was hoping that the recent email input would show up as suggestions in the email input field but that doesn't happen. My guess is that this doesn't happen because I dont submit the form with the email input using multipart/form-data. 
Is there any way to update the browser's autocomplete/autofill when submitting the form the way I'm doing?

A: try putting this in your form
autocomplete="on"

https://www.w3schools.com/tags/att_input_autocomplete.asp

A: You need to specify type of the input field type="email"

Note: The autocomplete attribute works with the following  types: text, search, url, tel, email, password, datepickers, range, and color.

