Search code examples
htmlgoogle-apps-scriptgoogle-forms

Automatically close the Form window after submitting


I have a Google Form as an iframe in a Google Sheet.

I need to close the form automatically after submitting answers.

Ideal scene would be:

a person hits submit button, the answers have been recorded and the window closes automatically.

But there is a following window ("thank you for you response" window) which (from my experience) is probably not possible to disconnect from the form and not to lose answers.

In this case it would be good to automatically close this second window right after it appears.

p.s. For submitting the form I use <button type="SUBMIT">Submit</button> (I copied and pasted, then modified the html because the form didn't work properly in an iframe mode)


Solution

  • Fully handled all issues by implementing elements from Materialize framework into my dialog withing a Spreadsheet.

    Amazing look and functionality!

    For the dialog I used SpreadsheetApp.getUi().showModelessDialog().

    Thank you for your answers and reactions which made me search for better options and discover such amazing solutions for myself.