As I work on my app development, I encountered an issue when trying to submit multiple forms using a single button.
I applied the same class to all the forms and looped through them to submit. While this approach worked smoothly on my localhost, it seems to be inconsistent on Heroku - where sometimes only one or a few forms get submitted.
const submitBtn = document.getElementById('submit-form');
const forms = document.querySelectorAll('.form');
submitBtn.addEventListener("click", () => {
forms.forEach(form => form.submit());
}