I have a Vue file and I am trying to specify an 'action' attribute for my form.
<template>
<div>
<form>
</form>
</div>
</template>
export default {
created() {
var test = document.getElementById("form");
test.setAttribute('action', 'file.php');
}
Unfortunately, setting it in a lifecycle hook does not seem to be working. Can someone please advise on what I should do in this situation?