Hey Sean,
First off, thank you so much. I've been tweaking your code a bit for a custom macro I've been designing for Confluence, and things have been going great so far.
Anyway - I read about issues handling multiple forms on a page, but what I'm trying to do is handle the same form but with a second submit on that page. Do you it's possible? I ended up placing another submit button in the "thankyou_message" div, but I can't get the handler to route it through AJAX, so, in an attached click handler, I just added a line to manually submit the page. But ... that kind of defeats the point haha. Any advice?
@AndrewDiMola I can't really help with your issue but am curious to know what your use case is for submitting the same form more than once on the same page?
Hey @iteles
Basically, I'm a technical writer writing a custom macro for Confluence (what we use for documentation). It's like Google's "Was this Helpful?" section that the company has on each of its web pages, except, for me, it'll be used to track what pages within our documentation need to be improved. Pictures attached.

I have the YES/NO buttons successfully routed to one tab in a Google sheet, and I have the SUBMIT FEEDBACK button successfully routed to another tab in that same sheet. I just can't get the second submit through AJAX.
Theory: I need to refresh the DOM or manually attach the event listener in "form-submission-handler.js" to the button outside the GForm because I'm appending after the DOM has already loaded and, possibly, the listener isn't active because of that.
Looks like I was right. I just added a click handler.
document.getElementById("comment_button").addEventListener("click", handleFormSubmit, false);
glad to hear you got it worked out!
Most helpful comment
Looks like I was right. I just added a click handler.
document.getElementById("comment_button").addEventListener("click",handleFormSubmit,false);