'Apps Script Forms, onsubmit values cant be used

I am creating a google form with a apps script manual trigger onsubmit like done here

but when i go to see the execution information to see the answers there are just showed the itemResponse value instead of the value itself. The code i am using is this:

function onFormSubmit(e) {
     var formResponse=e.response;
     var itemResponses = formResponse.getItemResponses();
     var test = itemResponses[0];
     Logger.log(itemResponses);
     Logger.log('test'+test);
}

when i see the logs of Logger i just see the following: Logs of execution

why is it behaving like that? is because the server cant catch the response itself onTime when the form is submited? how can i solve this issue?

Edit: To clarify my question, what i want is to catch the response to store them in another place instead of the binded spreadsheet



Solution 1:[1]

You are using the event object for the onFormtSubmit trigger for a form. If you want the event object for the Spreadsheet then use the other onFormSubmit trigger.

onFormSubmit for Spreadsheet

onFormSubmit for Form

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cooper