I\'m currently working on a basic form. When you hit the submit button, it should first change the value of a field, and then submit the form as usual. It all looks a bit li
document.getElementById("myform").submit();
This won't work as your form tag doesn't have an id.
Change it like this and it should work: