AppScript Events

Please help me on how to code an events in Appscript manually. When I submit the form. It will log the user information that he fillin from the form.

Registration using forms putting in firstname and lastname. Then onSubmit it will log the data in the spreadsheet. but I want to use the event on this.