I am developing an app and I am submitting multiple forms using only one button.
I have given them the same class and iterated through them and then submitted it. In my localhost, it works but in heroku it sometimes works and sometimes it submits only a couple or just one.
const submitBtn = document.getElementById('submit-form');
const forms = document.querySelectorAll('.form');
submitBtn.addEventListener("click", () => {
forms.forEach(form => form.submit());
}