I'm building a mobile web application with which employees can submit their worked hours for a given week. The form shows 7 forms (each form represents a day), and is built by a php loop function which runs an array containing information from the week. Each day is a different form.
I cannot combine all days into one, because I need to allow employees to add fields to each day (form in div) themselves to add activities they performed while working.
It looks like this:
If i combine all the days into one form, each time you add a field on a certain day, it adds the field to the first day (while you may need it on the last day).
The Question
I need to submit the entire week using one button. I have already seen javascript methods like
document.getElementById("form1").submit();
document.getElementById("form2").submit();
But this does not work properly. Can anyone provide me with a direction or some code which helps me to solve this? Any help would be highly appreciated!