⚙️ One-time setup required: Paste your Google Apps Script Web App URL below so registrations save directly to your Google Sheet.
How to get this URL →
✓ URL saved! Form is now connected to Google Sheets.
How to Connect Google Sheets
- Go to sheets.google.com and create a new spreadsheet
- Name it "Bayanihan Golf Registrations"
- In the spreadsheet, click Extensions → Apps Script
- Delete any existing code and paste the script below
- Click Deploy → New Deployment → Web App
- Set "Who has access" to Anyone
- Click Deploy, copy the Web App URL, paste it above and click Save
function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Add headers if sheet is empty
if (sheet.getLastRow() === 0) {
sheet.appendRow([
'Timestamp', 'First Name', 'Last Name', 'Email',
'Phone', 'Flight', 'Handicap', 'Country'
]);
}
var data = JSON.parse(e.postData.contents);
sheet.appendRow([
new Date().toLocaleString(),
data.firstName,
data.lastName,
data.email,
data.phone || '',
data.flight || '',
data.handicap || '',
data.country || ''
]);
return ContentService
.createTextOutput(JSON.stringify({ result: 'success' }))
.setMimeType(ContentService.MimeType.JSON);
}