I have been reading and watching many tutorials online but I could not find something that I can initially load some kind of dialog box or login page with a single input text so then I can process that using apps script.
onFormOpen() is not triggered on the user who completes the form.
On my onSubmitForm() function I have the following code:
function onFormSubmit(e){
var formResponses = FormApp.getActiveForm().getResponses();
var formResponse = formResponses[formResponses.length-1];
var itemResponses = formResponse.getItemResponses();
for (var j = 0; j < itemResponses.length; j++) {
var itemResponse = itemResponses[j];
Logger.log('Last response to the question "%s" was "%s"',
itemResponse.getItem().getTitle(),
itemResponse.getResponse())
}
}
Is there any way I can prevent from here the form being submitted with some kind of logic condition, for ex: execute the form submission only if certain field matches some condition?