I have written some code in Google Apps Script that generates a custom form (with some textboxes and a submit button) in the home page of a Google Site using the doGet() method.
What I now want is that, by clicking the submit button, and depending on the answers of the textboxes, load a new HTML code (generating another form).
For example, suppose that the user writes an email address in one of the textboxes. Two things may happen: either the email is not in the spreadsheet or it is. In the former case I want the code to load a sign-in form; in the latter, I want the code to show another form.
How can I do this?