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
Here is simple code. You must set an id for your input. Here call it 'myInput':
var myform = document.getElementById('myform'); myform.onsubmit = function(){ document.getElementById('myInput').value = '1'; myform.submit(); };