Creating a ticket reservation application
This application serves as an HTML form to the user to let them submit values to the server. This could be to reserve a ticket for a show, book a seat in a venue, book a room in a hotel, and many more purposes.
Create a spreadsheet and create column labels as shown in the following screenshot:
In the code file, create the doGet
, doPost
and cancelReservation
functions:
function doGet(e) { // Maximum available const MAX_TICKETS = 25; // 'cancel' is a query string appended with the published URL. var cancel = e.parameter.cancel; if(cancel){ var msg = cancelReservation(cancel); return ContentService.createTextOutput(msg); ...
Get Learning Google Apps Script now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.